The most fitting keyword is being determined out of a combination how well the keyword fits the search term, the match type like exact, phrase & broad
An exact match of a searcher’s keyword in a page’s content will generally rank better than the same keyword phrase in a different order. That’s the reason keyword research is really important and keeping the keyword phrase in the same order in the content promises better ranking.