WSUS is a Server OS Role. Upgrading the OS upgrades the version of WSUS. There are 3 ways to upgrade WSUS:
https://www.ajtek.ca/wsus/how-to-migrate-or-upgrade-wsus/
I recommend option #2 (https://www.ajtek.ca/wsus/another-successful-in-place-upgrade-why-not-change-how-you-think/) and if you can't go with that, option #3.