The background turned black and I cannot see the selection on objects.
For the background check the viewport shading settings:
And to see selected objects the overlay settings:
Those settings were untouched but the problem still occurred. I’m guessing it was a bug but restarting blender seemed to fix it.