Your app is a single-page app: there's only one real file, index.html, and React Router decides what to show based on the URL. Clicking links works because it happens in the browser. On refresh, Netlify looks for a file called /menu on disk, doesn't find it, 404.
Tell Netlify to serve index.html for all paths. Create public/_redirects (Vite copies public/ into dist/):
/* /index.html 200
or in netlify.toml:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200Vercel needs the same idea as a rewrite in vercel.json.