That's not to say that a VPS in addition isn't useful or fun. https://indieweb.org/POSSE and all. It just isn't at all required.
In most case the main factors to choose self hosting are independence, fun and learning by tinkering. That’s three items that GitHub Pages doesn’t provide.
Renting slices of someone else's shared HW hardly compares in terms of price to owning the full machine. Expected lifetime of some cheap SBC you'd use for hosting your personal projects is ~10 years. It can cost say EUR 50-100 to run it that long these days. 10 years of that hetzner VM is EUR 577. That's 500 EUR I can do something else with per machine.
Whenever I try calculating HW ownership vs renting in the "cloud" for personal usecases it at worst comes up to paying off in a year, and usually sooner.
There are also many other benefits of having physical access to the HW.
Just right now about 7 SBCs I run have total cost of ownership at $20 on average each and I've been running them for 5-7 years...
Reminder that if you are going to do this, then it has to lie within the subset of uses deemed acceptable by the GitHub terms, which forbids hosting on GitHub Pages for e.g. e-commerce or any other business reasons; GitHub Pages is not a 1-to-1 substitute for e.g. Cloudflare Pages or Netlify.
Or if it's a static rendered website you can publish on GitHub Pages for free and use a CNAME to use a custom domain which is what we do for our docs https://docs.servicestack.net created with https://vitepress.vuejs.org that uses GitHub Actions to build and publish the site.