Get 500 error on client side but 403 in terminal for the backend

Something really weird is happening with me. I was getting 500 error on client and I couldn’t figure out why.

Then I created a brand-new strapi project and moved all old files to the new project. Magically, it started working again!

That is the second time I do this to fix the same problem, so probably it will happens a third time. I have no clue why reinstalling the project fixes it.