Both are like two eyes of SEO, one is not possible with other. If you want the website to crawl regularly, then good On page is needed and if you want to increase the visibility of the website in search results by generating organic back links then off page comes.
Both on page and off page activities are important. Because on page will help you to add content to the site, and off page activities will help to promote it.