The problem was in the package.json
It turns out that when updating to expo version 52.0.7, I did not finish updating all the libraries related to routing to the new version to be compatible.
The command that updated it automatically (in theory) did not work, so I have updated it manually, and I had to put the versions correctly, especially the expo router and react-navigation/drawer.