alter compatibility level
What is best practice for changing the compatibility level - before or after the SP2 and cumulative updates are installed?

SQL Server 2016 SP1 is out-of-support so you should upgrade to supported service pack first.
Then the best practices for altering the database compatibility level are documented here: Change the Database Compatibility Level and use the Query Store