This just happened to me two days ago. I thought my cable had failed, and I ordered a new one. Next day, it after the cable arrived and replacing the cable proved useless, I searched and found this thread.
I first tried moving just the more narrowly focused file at
mv /System/Volumes/Data/Users/<myusername>/Library/Preferences/ByHost/com.apple.windowserver.displays.<hexadecimal-uuid-value>.plist ~/Desktop
and rebooting, but nothing changed.
Then I moved the file at the more general /Library/Preferences location:
sudo mv /Library/Preferences/com.apple.windowserver.displays.plist ~/Desktop
and rebooted, and all is well.
What is crazy is I had run the OS update a few days prior, and had no issues when I plugged the external monitor in. It was only when I switched inputs & cables for the external monitor that the problem suddenly appeared, but even switching back to the original input and cable, the issue persisted. FWIW I'm using a USB-C to DVI cable to drive a 49" Samsung Odyssey G9 from an M3-equipped MacBook Pro; the cable I'm using allows the monitor to run at 120Hz (limit of the Mac hardware). None of that matters for this issue. But I'm including it in case doing so helps others find this post when they search.