Hi @Edward ,
On October 10, 2017, Microsoft Office SharePoint Server 2007 reached end of support. Per my research, i didn't find any article about does SharePoint 2007 run without problem on Windows 2012 R2 or 2016. We suggest you have to migrate from SharePoint Server 2007 to Microsoft 365 or a newer version of SharePoint Server on-premises. And here is a article provides resources to help you migrate data to SharePoint Online or upgrade your SharePoint Server on-premises.
For Reference: SharePoint Server 2007 end of support roadmap
If the answer is helpful, 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.