Do you have a Time Machine backup?
If so then replace the HD and restore from TM backup
Mac Basics: Time Machine backs up your Mac - Apple Support
Otherwise you can try an app like the free SuperDuper or the paid Carbon Copy Cloner and clone the HD to the external disk. The clone will be bootable. The external disk has to be blank since it gets reformatted.
However, that may fail because of problem with your HD.
It might be better to just copy the necessary files/data to the external using copy and paste via FInder