Earning by fees will be the motivation to run miners long before the last few Bitcoins are mined. The last block reward will be 1 Satoshi for about 4 years.
That's most likely the case where a miner can earn. When all the Bitcoins are mined then miners will no longer mine new coins and they will only earn from transaction fees. I don't know if miners would still be profitable in some part of countries where their electricity bill is not cheap or doesn't have an alternative way to have electricity at low cost. Well, other people do use much higher sats/byte in their transaction even though they amount they transact is not much.