I wanted to note that homebrew websites and SEO optimized websites aren't necessarily opponents here, or in opposite corners. They are often the same tech under the hood.
Case in point: SvelteJS. It's absolutely great for a homebrew website. It's also maintained by the NYTimes, which I subscribe to and like myself, but which also has a large chunk of its business in the SEO optimized website category (see: Wirecutter).
It does it in a classy way which doesn't feel so much like ads are being stuffed down your throat - but that business is SEO optimized down to its bones.
Just skimming the front page of Wirecutter now, a NYTimes owned property, shows articles like "The Best Sunscreens for Your Face", "The best beard trimmers we tested side by side surrounded by their attachments", "The Best Women’s Razors (for Every Body)" - these are all so textbook and by the SEO playbook they could be taught in a course.