It’s basically the size of your transaction in vb x fee rate. How I understand it is that the less inputs and outputs there are, the smaller the size will be. Less utxos in a transactions makes it less expensive.
A smaller fee rate, obviously makes it less expensive as well (<5 sats/vb in this case)
Depending on which transaction coordinator you use, you can see the size of the transaction and an estimated fee before sending