Transaction fees are influenced by the data size of a transaction, which increases with the number of UTXOs it uses, thereby affecting the cost.