Raspberry Pi 3b+ only starts at console. can't load desktop

My Pi has mysteriously started booting straight to the console with a login prompt. Looks like there might be some sort of odd permissions error? Before this, the wifi wasn't working. How can I get this back to the desktop?

Really sorry about the photo, but the Pi and my phone are all I have right now.

Well, I ended up just re-flashing the SD card. IDK what the problem is.

Did the re-flash solve the issue?

Only time will tell. But so far, it is booting into the desktop.

Glad it's working. I have seen SD cards sometimes be finicky.