Certain actions like website migration, restoration, or changing the domain name might cause pages, except the main one, to display a 404 Error. To fix this issue, reset your permalinks by following these steps:
Log into your WordPress Admin area, go to the Settings menu, and click on Permalinks:
Take note of the type of permalinks that is currently in use for later reference
Next, select any other option different from the current one. For example, if you were using Plain, select Numeric. Click on Save changes to apply them:
Immediately switch the option back to the original type and save the changes again. This will recreate your site's permalinks
To verify the result, refresh the website page by pressing Ctrl+F5 or open it using incognito mode.