Your snippet is correct. These are the general steps to do.
There is a very good writeup from Johan Arvidmark, which is adding some extra hints. It is from 2017, but it still can be considered to be valid. It shows how you properly "shutdown" the configuration manager services and how you can verify that old and new sql server are configured equally and that the re-configuration via configuration manager setup runs smoothly.
Also, note that the blog post is describing the very other direction of what you plan to do. Which brings me to my last point: If you haven't done so far, discuss with your colleagues again, if you really want to do it. Things to take into consideration: licensing, performance overhead, security, manageability (sql ops vs. configmgr ops team) in daily business.
Here you go to Johans blog post: https://deploymentresearch.com/moving-the-configmgr-current-branch-database-to-another-server-as-in-back-to-the-primary-site-server/
Hope it helps!