React 18 Beginnners Game-Hub app build issue

Hi,
I am at the 39th slide, build the project using npm run build. It woked and created a folder ‘dist’ with assets folder, vite.svg and index.html but when i try to run the application from this code from AWS S3 bucket it is not working.
I copyied all the content from dist folder to my S3 bucket and configured the bucket for static web hosting.

My goal is create a single page application and host it on S3 bucket.
Did i missed any thing here, please advice.
Thank you.

There is an update, I found another article which mentioned how to check local build with command “npm run preview” it works on localhost.
I am still trying to figure out how to host this app on Amazon S3 bucket.
Thanks in advance.

Finally i figured out and successfully deployed the website.
To host on AWS we have to use AWS Amlify static website hosting.
Once we comnnect AWS Amplify CLI to git it will work seamlessly.