Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I think you need to first get all the users here: sharepointdiary.com/2020/01/… and then run a second script that iterates all groups in all sites and cross run the result. I don't think there's a one-script-to-rule-them-all in your task.
In this case I would create an empty subsite only containing Home.aspx and nothing else. Users have read access to the subsite, but since it doesn't contain valuable data, its the way to go
If your users don't have read access to the site, the browser can't find the reference to the default page (Home.aspx). So you need to give them read access to the site itself.