I use Google Flights, which displays many flight options depending on your criteria.
I then pick one of the flights. It then displays the different prices for that exact flight from different sources. Sometimes, the flights are cheapest if they are direct from the airline; other times, they are not. Google Flights allows you to then choose the source of your ticket.
For example, I recently decided on a particular round trip flight from Bangkok to Boston. Qatar Airways, based on price and total trip duration. The cheapest source for that exact trip was American Airlines, so I booked with them. I saved $2,000 ($1,000 per ticket x 2 tickets) by booking that trip through AA rather than Qatar directly! (I verified by going through the Qatar website and then canceling at the last stage.)