I have deployed my website on AWS using React and react-router-dom for simple route changing. However, I made a mistake by only uploading the index.html file for both the origin page and error page to S3. Although the website works properly when someone enters the URL and navigates through the routes, neither PageSpeed Insight nor Google Ads/Search Console can recognize the router's URL and show an error. The network shows a 404 error for the document that is supposed to be on that URL.
For example, https://website.com is working correctly and recognized by Google. However, https://website.com/something is sending the user where I want, but it shows a 404 error because something.html is not recognized. As a result, PageSpeed cannot read it, nor can Google Search or Ads recognize it.