I heard that On-Site SEO improves ranking for articles and keywords
this is true, but on-site SEO entails a lot of things, and each one of them is important (I'm speaking about white hat SEO, if you're a master black hatter and can rank within 24 hours by doing shady stuff kudos to you, but I'm not familiar with these techniques so I'm not mentioning them):
- site speed... this one's a no-brainer: sites that load within 1-2 seconds maximum are favored over sites that take ages to load
- site structure... sites that the googlebot can crawl and index fast and easily are always in much better position to get ranked than sites that are clunky, confusing and have lots of levels to their URL structure (not saying that big sites don't rank, but it's preferred that ALL of your important pages are reachable with 2 clicks maximum from the homepage. This makes for a great site structure)
- technical SEO... that is, sites that don't have 404 pages, broken links, etc. and which are mobile friendly (mobile friendliness has actually been one of the top ranking factors in the last years) are always favored over non-technically optimized sites
- topical authority (big deal nowadays)... sites that are centered around one topic and one topic only always get in google's good graces easier than "scattered all over the place" general "Jack of all trades" types of websites. You'd have to be a really big player like Amazon, Shopify or Etsy to rank with general purpose sites nowadays...
Topical authority means that your site covers one topic in its entirety and many of its backlinks come from topically relevant sites, as well...
And I'm sure there are a few more things that fall into the "on-site SEO" topic, but I can't remember them at the moment... maybe some else can remember them....
Would the best ON-Site SEO you can do just to install CloudFlare?
oh yeah, CDN is another thing that matters. Thank God that you've mentioned CF because I just remembered how CDNs are important, too... although they usually fall within the "site speed and optimization" category.... So yeah, CF helps too....