Page not found after migration to localhost. I already updated the sql links and the permalinks. Wp-admin page works perfectly

So basically whats in the title. I migrated the company website to my localhost to implement some changes. First I cloned the repository, then I created the database, and uploaded the sql file. Configured the wp-config.php file. Ran the sql querries to update the links in the databse, restarted everything, and when I go to the local host address it throws an “oops, page not found” error. What’s weirder is that the wp-admin page works perfectly and I can see all the contents of the site in there, but whenever I try to open any page it throws the same “page not found” screen. The links seem to be working well too. And I even added this:

Question about repurposing WordPress 404 handler

I’ve been experimenting with repurposing WordPress’s 404 handler/template file for a Real Estate site that I’m developing. I understand that when a non-existent URL is requested, the 404 page gets served up and that it returns a 404 status code (instead of a 200). But I’ve recently found a way to adapt the 404 template file so that it does something a bit more creative. More specifically, I’m first parsing the non-existent URL that was requested, and then using the returned value to query an external API and then display the returned data. So far it’s working much better than I’d expected, though I’m aware of one significant issue that I’m hoping I can address.