My question is how to rank these websites?
now that, my friend, is the $1,000,000 question
You can start with finding approachable niches (for newbies, "approachable" niches almost always are found in huge, evergreen industries like health & medical, finance, tech, pets, self-improvement, education, home improvement, parenting, etc...)
As long as you find something that you like / are remotely interested in, from these big industries and which is profitable and not very competitive (you need to analyze the 1st page of google for the main keywords of your niche in order to figure out whether it's approachable or not) you can safely go with that.
And then you need to find a few main keywords (let's say 3 to 10 for start, but it can be more than 10, but start with few in the beginning).... actually, I should probably say "topics" instead of keywords, even if - most of the time - these 2 terms are identical.)
But, in the context of what I'm referring to, topics usually means high volume and / or short keywords (1-word to 3-word usually) that are very relevant in the niche you found, and which you can create your site's structure around (and site structure is one of the important parts of SEO nowadays, so you'd better do it properly, or else you might start your SEO with a handicap)...
Anyway...
1) find a good niche (profitable, easy to tackle, evergreen)
2) find 3-10 main topics in your niche that you can structure your site around, and center your content around
3) find 3-20 sub-topics (usually long tail keywords, ie. keywords with more than 4 words, but usually more than 5-6 words, or even longer) that are relatively easy to rank for when compared to the main topics
4) create content around all of these topics (by content I don't necessarily mean walls of text that nobody - except for the bots - reads and which bores people to death, although - most of the time - that's what content refers to

... Content can mean anything from walls of text like I said, to images and videos - this type of content is particularly useful in industries like food recipes, travel, or software tutorials - to everything in between, such as infographics, tables, charts, stats... even memes are useful sometimes)
5) interlink all of this content (both from the main topics to the supporting content / sub-topics, as well as the other way around)
6) generate a sitemap and submit it to your GSC (if you do want to use GSC, some people prefer not to work with google anymore - which is cool if you asked me

- otherwise, I don't know if it's worth generating the sitemap, as for me sitemaps are only good for making google's job easier in crawling your site... But anyway, as a newbie you probably want to submit your sitemap to GSC, so do that if you're not a passionate google hater like I am)
7) backlinks... start building links, slowly, safely, but continuously, and aim only for quality links in the beginning. What quality links are is a topic that will require its own separate section to discuss, but - in general - links that come from legitimate sites that are constantly getting organic traffic from search engines and which are not seen as link farms can be considered quality links... Also brand mentions are pretty good nowadays, so if your brand is somewhat popular and if people mention in on social media, UGC sites, or on their blogs that's a good sign and it will probably skyrocket the rankings of your easier keywords like no other type of backlink will.
8) monitor, track, adjust, improve, etc... that is, keep an eye on your site's health, on your ranked keywords, on your indexed pages, on your content performance, etc. so you can spot any issues with these and fix / adjust / improve as needed...
And that's pretty much it, in a nutshell. I know that I could have gone into way more details on each one of these steps, but this post is already long enough, so I'll stop here. But if you're stuck on some step ask for help and one of us will help you out...