Basically, Off- Page SEO comprises all external positioning factors, that is, those that do not belong to your page” and, theoretically, it is not possible to control directly through On-Page SEO.
While On-Page SEO is critical to building a good positioning foundation, most of the factors that influence a page’s ranking are based on Off-Page Optimization, especially in 2019.
Since links are so important for positioning, it is normal for Off Page SEO to have as its main objective to obtain or facilitate other pages to link to yours.
And also to talk about them on Social Networks, Forums, Blogs, etc.
The best answer is: both.
On-Page SEO is essential, but by itself it does not guarantee a good positioning, especially when competing in competitive niches.
And that's where Off Page SEO comes in, which will help you gain authority and climb search positions.
Getting Inbound Links (“Link Building”) can be one of the most tedious but necessary tasks in almost any SEO campaign.
Therefore, it is an activity that you should at least know about because it is very important in organic positioning.
Because they greatly influence PageRank, as Google considers each link to be a “vote of confidence”.
Every time you receive a link from your page on Facebook, Twitter, Google Plus, etc., Google “takes note” that your content is good enough to share.
Of course, not all links have the same importance, those that come from recognized authorities (eg Wikipedia) will give more strength to your positioning than dozens of lower quality links (eg comments on blogs).
We all know it's not easy to get a link from an authoritative site, and Google knows too, which is why authority plays such an important role when it comes to valuing links.
You will find many opinions regarding dofollow and nofollow links.
In principle, it is assumed that “dofollow” links are those in which part of the authority of the linking page is transferred.
And the “nofollow” only mentions the site, but does not transmit authority or PageRank.
However, not everything is so simple. First of all, no one has proven that this is always the case, so it is possible for nofollow links to transfer (although part of) these benefits.
In addition, each link, of whatever type, is an opportunity to get visitors, who tend to be of better quality (more relevant to your offer) than organic visitors.
And finally: nofollow links are necessary to have a natural profile and reduce the risk of being penalized. It wouldn't make sense for most of your links to be dofollow.
Finally, opting for a strategy that values naturalness is the best choice.