Google has many factors in its algorithm to rank the websites in SERPs. Using its algorithm, it finds the relevant results for the users’ queries.
Google keeps updating its ranking factors to give users the best experience and to put a check on black hat SEO techniques. So, Google displays results on the basis of ranking factors such as content, backlinks and mobile optimization.