Windows Server 2012 is end of life - it's no longer getting any updates. Security advantages are of the new supported OS that gets security updates.
WSUS on Server 2012 had extra steps required for Windows 10/11 Upgrades (See part 3 of my guide - https://www.ajtek.ca/wsus/how-to-setup-manage-and-maintain-wsus-part-3-windows-as-a-service-waas-and-group-policy-administrative-templates/). Also, more adjustments are needed for UUP, but they also are on 2022 (https://www.ajtek.ca/guides/how-to-prepare-for-on-prem-wsus-uup-updates/)
Why not in-place upgrade your 2012 to 2022? (https://www.ajtek.ca/wsus/another-successful-in-place-upgrade-why-not-change-how-you-think/)
Alternatively, Migrate your WSUS (https://www.ajtek.ca/wsus/how-to-migrate-or-upgrade-wsus/) after installing your new version of 2022 (https://www.ajtek.ca/wsus/how-to-setup-manage-and-maintain-wsus-part-1-choosing-your-server-os/)
Be sure to make sure you setup SSL (in part 7).