How to fix a broken bootloader on Arduino MKR WiFi 1010 - No Longer Programmable

I am trying to program an Arduino MKR WiFi 1010 board right now but seem unable to do it. I think I may have broken the bootloader. But is there a way to fix a broken bootloader on this type of board?

My fix was to simply put the device in bootloader mode (pressing reset twice) and then specifying the port (I thought it would automatically be found), and then upload a new sketch when in bootloader mode. You know that you are in bootloader mode because you will see the default LED slowly pulsing on and off (orange).

After this, I found my board to be programmable once again!