How do vector DBs sort?

After getting similar vectors, how vector database sort these vectors to return based in relevance?

By the distance metric you specified, such as Cosine (most common), Euclidean, or Dotproduct