If the sketch compiles, then it should work fine. I can’t speak for your particular setup, other than to maybe go the arcore github and upload the Midi Echo tests
found here and see whether the messages sent to your Arduino are echoed back to the PC. This will make sure that MIDI USB is working for you. Also test the basic Mozzi Examples and make sure they work in isolation. I don’t think its possible for you to damage your Arduino by uploading firmware to it in most cases, so just give it a go! Let me know how it turns out for you. You will know the firware is working correctly if you send a midi clock signal to the nanosynth and the led on D13 starts flashing in time with the clock signal.