The reset button on synology can do a mode 1 reset (hold 4 seconds) in regards to clearing the root/admin password so you can log in, but will not delete the data on your volume.
https://kb.synology.com/en-sg/DSM/tutorial/How_do_I_log_in_if_I_forgot_the_admin_password
https://kb.synology.com/en-id/DSM/tutorial/How_to_reset_my_Synology_NAS_7
you should also become a member at https://community.synology.com and https://www.synoforum.com/ and ask these sort of synology specific questions there. Last I remember synology screwed up their official forums so the latter unofficial one might be better.
Once you have the root password, and can log in via web browser to the synology and go through that initial setup; then in DSM enable their SSH login so you can log in that way to the synology and unmanipulate whatever you are doing. Given it is ssh, you should be able to edit /etc/ssh/sshd_config
there and PermitRootLogin yes
followed by a service sshd restart
and then login over ssh as root to do what you need.
and also verify from synology knowledge center as much as you can before doing a reset.
your existing data will remain unharmed, as long as you don't explicitly go looking to delete a volume or storage pool. The mode2 reset where you will reinstall DSM that will lose your existing configs, and will likely fix your problem but then you'll have to reinstall the extra apps and set stuff up again.
https://www.synoforum.com/threads/restore-reset-without-losing-your-hard-drive-stuff.2724/
su
command to become root with root's passwd? Login as root might be disabled. – meuh Jul 31 '23 at 12:26