Do you have the HC05 connected to the Nano hardware serial (pins 0 and 1)? If so, that will interfere with program upload. Use a software serial port for the HC05 at least while you are in development. That will free the hardware port for program upload, debugging and observing program output in the serial monitor.
If this does not help, please post the test code.
Please read the forum guidelines to see how to properly post code and some information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
Please post a wiring diagram. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.