On-Page SEO is important and so is Off page. Even if you have done your on-page perfectly but you don't have enough number of backlinks then your chances of ranking are very less.
It is important to focus on Title, Meta DEscription, Meta Keywords, H1, ALt text when it comes to on-page. Whereas quality of backlinks, Referring domains, come into picture when talking about Off page SEO