First of all, you may need to check whether the necessary feature has been installed, such as Common HTTP Features, Application Development, Management Tools etc.
Secondly, considering it is migrated from windows 2012, you could try to set application pool to
classic mode and
enable 32-bit applications in application pool advanced setting.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.