Site works fine but when going to details page and refreshing - it goes to a 404 Page not found

Hey guys,

So I made a website called

It uses a repo that has 2 folders(Client - frontend & Server - backend).

The site runs well but when I get to the details page of the site ( or clicking any of the decks) through the home page it works but if im at the detail page it goes to a 404 or if i directly go to the link above
goes to a page not found…What am I doing wrong? I already put in the build settings that my publish directory is client/dist

Github:GitHub - ykay220/flashcardproject
Screenshot 2023-06-13 213650

@yamsMMA See the answer I gave another user here: