Please check this points. maybe it’s helpful to you
Permalink Settings: Ensure that your permalink settings are correctly configured in WordPress. Go to Settings > Permalinks and choose a structure that suits your needs.
301 Redirects: If you’re changing the URL of an existing post or page, set up 301 redirects from the old URL to the new one to maintain SEO rankings and ensure users can still find the content. You can use plugins like Redirection to manage these.
Internal Links: Update any internal links pointing to the old URL to point to the new URL. This includes links in your content, menus, and widgets.
Search Engine Indexing: Submit the updated sitemap to search engines like Google to help them re-index your site with the new URLs.
External Links: If there are external sites linking to your old URLs, try to update those links if possible. This might involve reaching out to site owners to inform them of the change.
Broken Links: After making the changes, run a broken link checker to ensure there are no broken links on your site due to the URL changes.
Cache and CDN: Clear your site’s cache and any CDN cache to ensure the changes take effect immediately for all users.