We are planning to upgrade windows server 2012 VM to Windows server 2019 .
wanted to confirm if ColdFusion 11 will work on it ?
Or do we need to upgrade the ColdFusion version along with Windows?
The answer is a conditional yes and no (especially since you are proposing to upgrade the OS underlying CF. More in a moment.)
It should be said first that no, CF11 does not formally support Server 2019, and it never will. (FWIW, while CF2018 got support for it with its update 2 in Feb 2019, I don't see that even CF2016 ever got it.)
Does that mean you won't be able to run your CF11 on Server 2019? No, it does not. Many people find they can run older CF versions on OS versions that are not formally supported.
Indeed, while some people may find that they cannot INSTALL an older CF version onto a newer OS (that it never supported), they have NO trouble with it continuing to run when they instead update the OS, as you are proposing. That way they are never running the CF installer. (And to be clear, it's generally a problem that the installer that Adobe license has some underlying inability to run on the new OS, not CF itself.)
That said, do beware that the version of IIS changes as well (from IIS 8 or 8.5 in 2012 to 10 in 2019 or 2016), and that could be a problem in that you will find that the CF wsconfig tool will no longer work. But again, if you have no need to touch that after the OS upgrade, then you may be fine.
Now you see why my answer is a CONDITIONAL yes and no. Of course, it's always dicey trying to run things in a manner that was not formally supported. Again, folks do it. Some feel more compelled than others to jump through hoops to make it work, while others just cross their fingers and hope that nothing goes amiss.
To that last point, it should be noted also that you are taking a SERIOUS security risk in running CF11. As you may know, Adobe's support for that ended in 2019, 5 years after its release in 2014. Specifically, there are no more updates to it (including security updates) since mid-2019. You would need to be "crossing your fingers" in hope that you would not suffer a break-in due to the lack of those updates. Again, some will take that risk. But at least you're now informed of that risk. (And if you wanted to update to a later CF version, note that Adobe and official resellers only sell CF2021 now.)