I am on the newest version of Photoshop (23.4.2). I have updated both my graphic card drivers and my drawing tablet's drivers, without solving the issue. It happens while I am painting, always when I am zooming in or out. I can use the rest of the software like open settings, but nothing I do to the canvas actually happens, as if it were frozen. If anyone has any ideas on how to fix this, please let me know.
Looks like this has been an error since 2020 and has not yet been fixed.
The problem seems to have gone away on its own, without me trying to do any of the things you've suggested. It's strange, because I had tried restarting and reinstalling without a fix. Thanks for your help! If the problem occurs again, I will try these solutions for it.