Some consumer storage services used to serve a folder as a website. Dropbox and Google Drive both removed it, and guides describing it are out of date.

What happens now
A page file in a sync folder opens in the service's viewer. You see the markup, or a preview panel, or a download prompt.
Stylesheets and scripts referenced by the page do not resolve, because the addresses the viewer produces are not the folder structure the page expects. The result is either the source code or an unstyled page.
Nothing about this is fixable from your side. The capability was withdrawn.
| Product | Serves a website |
|---|---|
| Consumer sync folder | No |
| Document suite storage | No |
| Object storage (developer) | Yes, with configuration |
| Static hosting | Yes, designed for it |
| Repository hosting | Yes |
Why it went away
The services did not publish detailed reasons, but the practical constraints are clear.
Abuse risk. A trusted domain serving arbitrary pages can be misused for phishing.
Traffic. Serving a popular page uses bandwidth, and storage plans have their own sharing limits.
Different product. Storage is built for space and sync. Hosting is a different kind of service.
Object storage is a different thing
Developer object storage does host static sites properly, with custom domains and certificates, and it is a normal way to run a site.
It is not a sync folder. It has its own concepts, its own access configuration, and a pricing model based on requests and transfer. Confusing the two is the usual source of the belief that storage can host a site.

What static hosting gives you that storage never did
A real address. On your own domain, rather than a storage link containing an identifier.
Correct serving. The entry page loads at the folder address, paths resolve, and the site behaves as a site.
A certificate. Automatic, renewed, no warning screens.
No viewer frame. Your page is the page, not a panel inside somebody else's interface.
Many static hosts have a free tier at the volume a small site produces.
If this is near what you are doing, Sharing from a sync folder and Free static website hosting, compared honestly cover the cases on either side.
Put it at an address
Stop planning around storage serving pages, use static hosting instead, keep object storage separate in your thinking, check that a custom domain is included, and upload the folder with its structure intact.