Welcome to the complex world of airline ticketing!
Air fares are divided in
classes which are identified with a letter. Each class has a specific availability, fare and fare conditions.
For instance, on British Airways, for economy class, the fare classes are: Q, O, G, V, S, N, M, L, K, H, B, Y (the exact hierarchy might be wrong, apologies, but that gives at least a rough idea).
Y offers the most flexibility and the widest availability, hence it will be the most expensive (i.e. that's the one you're looking for) and Q the cheapest. Not all classes are offered on all flights: they might be restricted for groups or award tickets; and availability might vary depending on the exact routing or point-of-sale.
If you ask a travel agent, it will be quite easy for them to find the Y class fare between X and Y using their GDS software.
Unfortunately, using online travel agencies, it is trickier as they usually only display the cheapest class available, or the cheapest
fully flexible class available (in the example above Y, B and H are fully flexible).
Still, there is a way using the great ITA Matrix tool:
https://matrix.itasoftware.com/
Choose one-way, enter the departure, arrival and date, and in the "Extension Code" box add:
F bc=y which will restrict the fare search to the Y class.
Example search:
This returns the Y class fare for the flight (notice all flights are at the same price...):
Be prepared to be quite shocked as full fares for airlines are
really expensive, much more than rail fares!
Low-cost airlines flights are only sold through their proprietary system, rather than being available through global distribution systems, so they will not be displayed through this tool (plus they have much more granularity and agility in setting the fare classes).
PS/ Fun fact that is forgotten these days... up to 2018 one could purchase a "YY fare" which was a fully-flexible fare valid anytime, on any airline. That one was even more expensive...