I didn't say that the miners are "greedy". I was asking if they are adopting a "greedy algorithm" to choose transcations.
Miners are free to use any algorithm they like in order to choose which transactions to include in their candidate blocks.
In general, then yes, miners simply prioritize the transactions in their mempool which have the highest fee rate. There are a few exceptions to this - for example mining pools will also include their own transactions with very low fees, Binance pool includes transactions made by the Binance exchange with low fees, they may include transactions they have been paid privately to include, and so on. However, these types of transactions usually only make a small handful of the total number in the block, with the vast majority of transactions simply being prioritized based on their fee rate.