It's impossible to brick a stm32. Make sure nRST is connected.
Some ST-Link clones have nRST wrong, connected to a wrong pin, thus not working.
Better to enable SWD in the code you're flashing so the interface is always active, avoding the requirement of nRST pin.
Anyways, you can manually do it:
- Connect SWD, Open ST-Link Utility.
- Short nRST to gnd or press button if available.
- Click connect on ST-Link Utility, wait 1-2 seconds, remove nRST short.
- Should recognize it. Erase it and it'll be ready.