I needed to reinstall the windows 11 from ISO file (disconnected from the internet during install). I did the reinstall keeping all my apps and settings and it worked perfectly. MSFS started working right after. And just to confirm the problem I accidentally let windows do automatic updates and it broke again the next day. Another reinstall fixed it but this time I have all windows updates disabled at least for a while.