Don't make the mistake of thinking there's a universal structure that works for everything. Even in companies, the approach changes depending on whether they're building a monolithic app, a microservices system, or a library. What you can do is learn the common principles and then adapt them to your specific project, instead of chasing whatever's trending in tutorials.
The foundation that works almost always is dividing code by responsibility: UI components/logic separated from business logic, API calls isolated in dedicated services, utilities in separate folders, tests alongside the code they test. If you're using a framework like React or Vue, leverage its natural structure and add organization on top of it for config files, constants, helpers. If it's vanilla JavaScript, you could think about a layered architecture (presentation, logic, data access) or self-contained modules with specific purposes.
What really matters is that your team (or you six months from now) can navigate the project without losing your mind. If you open a folder and immediately understand what's in there, if file names tell you what they do, if you can find where to modify a feature without digging everywhere, then the structure is working. Start simple, expand as the project grows, and don't be afraid to refactor folders if things start getting messy.