Security of my modem from resets

Solution 1:

Yes, holding down the reset button on the modem will fully factory reset it, resetting the password to its UI to whatever it defaults to.

You can't really prevent someone from resetting the router via the button in most cases, but you could try putting a physical barrier around it, but if someone really wanted to get around it, it wouldn't be much use.

You should assume if someone has physical access to a device (be that a router, laptop, etc) that they will gain access to it - it's up to you to keep it in a secure location to prevent that.