The procedure is the same one that you'd follow to replace an active instance of Entra Connect Sync with a staging one. Detailed step by step instructions are available at https://video2.skills-academy.com/en-us/entra/identity/hybrid/connect/how-to-connect-sync-staging-server
hth
Marcin