Usually, these types of issues occur due to any problem with Permalinks. To fix this, you can refresh the WordPress Permalinks Settings. Please go to WordPress Settings > Permalinks and click Save Changes. This will refresh the permalinks structure for you.