Comparing genetic sequences is the most accurate way of determining evolutionary relationships. This is a quantitive measure, ( it uses numbers) we can use gene sequencing to identify how much of the genetic sequence in A is the same in organism B. The greater the similarities the more likely it is they have recently evolved from a common ancestor. The closer the ancestor, the less time has passed which means there’s been less time to develop mutations a base variation. That’s why there’s more genetic similarities between two things that are closely related.
Hope that makes sense