The importance of on-topic and off-topic links has always been a big issue among website owners and marketers—all of whom want to know whether it matters that they have more of the other or not. By on-topic links, people usually mean those coming from pages and sites that talk about the same or at least a very similar subject matter as their own. With all the talk of link quality being more important than link quantity, it makes sense why people would think that Google somewhat cares about the degree of on-topic or off-topic relevance links have.
SEOs will argue passionately about one or the other, based on their different experiences. Some testify that on-topic links are significantly more important in SEO than off-topic ones, while others see more positive results from the latter. What these anecdotal evidences tell us is that either way Google sees it, and whether or not it has some idea of context. It is also said that Google looks at the relationship of content between the liked pages, both on-topic and off-topic links possess the power to influence searches to some extent.
Link context is an important criterion to look at, if you are engaging in link-building strategies that could potentially be seen or tagged as manipulative. When in doubt about the appropriateness of putting a link out there, you can always go back to your on-topic standards. However, before obsessing over which type of link is more valuable, ask yourself if it is even realistic for you to pursue and get those links. It all boils down to what search engines care about the most, which is to match content relevance to the search query, while measuring link popularity. They also care about brand and topical authority as well as domain authority, along with other things like user data, engagement, and anchor text—all of which form part of a bigger puzzle than link context.