Microsoft Azure supports in-place upgrade to Windows Server 2019 and Windows Server 2022. All data, server roles and settings are taken over in the process. For a successful in-place upgrade there are a few requirements.
This guide shows how to successfully perform a direct upgrade to a newer Windows Server version.