About the minig class theory you can omit it, it is well documented:
https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch12_mining.adocBlock size is 1MB, Merkle trees, Block header etc... all is there.
Therefore, Alberto, it’s possible that the miner didn’t choose your transaction, even if it had a higher fee.
Yes I know that that depends of how often miners update their mining block template, also depends of miner Node policies to acept or not Full RBF as I said before that is outside of our control.