Hi there!
I think this problem is specifically with UE5, when you have latest Visual Studio updates. I am facing the same issue after updating Visual Studio 2022 to v17.9 yesterday.
Similar issues are reported recently in their community posts:
[Internal compiler error after upgrading Visual Studio to 17.9.0 - Developer Community]
https://developercommunity.visualstudio.com/t/Internal-compiler-error-after-upgrading/10594256?sort=newest&topics=visual+studio+2019&WT.mc_id=WD-MVP-5003763