I think “reinstall DSM but keep data” is what you’re looking for (in the article below). But I’ve never tried it, so wait until someone else confirms that they’ve done it and the data lived through it. Be careful.
here is official guide from Syno KBfor your request:
1. you can reset just administrator login credentials and network settings to default settings if you have forgotten your password, want to move your Synology NAS to another network environment, or need to assign a new IP address. Then all data will remain in the NAS.
Use the guidelines.
Don’t use the second reset type, otherwise you will lose entire NAS setup and data.