Avoid using apex domains. They are not made for the web, and cause enough issues that it is better to plan on redirecting to another central website. It does not have to be www, which has a cultural meaning but is non-essential.
Search Engine Optimization (SEO) is not a priority with these sites.
SEO is about popularity and attention economics. Searching and sharing useful knowledge does not require SEO.
What actually optimizes for search engines? It depends on what the engine is. However, there are universals to follow that will get everyone most of the way: writing well and organizing well.
Some top-level domains are technically better than others. This is because as a keyword-based set, the domain name system is used as an ephemeral value store and marketplace. Which means reputation comes up, and some domains are administered with processes that are exploited, thus ruining that domain’s reputation.
Others are regulated better, and therefore obtain a palatable reputation.
In practice this means a domain like .org will not be blocked, whereas .xyz may be. Blocking refers to services and network firewalls may block traffic to and from those domains.