When you change the slug of your product or product categories, the page might not be working properly sometimes.
You can face this error “Page not found error“
For solving the “page not found” error, navigate to Dashboard -> Settings -> Permalinks -> Select Post name and just save settings. If you already select the post name option then only click on save changes.