What versions of C++ are compatible with UE?

I will be using UE 5. I know C++20 is compatible with VS Code, and I am only using it for PC, not cross platform. Does that make a difference?