It can be but is not a recommended solution. Clean install and migrate is a better option.
https://learn.microsoft.com/en-us/windows-server/upgrade/upgrade-overview#which-version-of-windows-server-should-i-upgrade-to
--please don't forget to upvote
and Accept as answer
if the reply is helpful--