Here's how I understand it (I admit that I might be wrong BTW). Where am I misunderstanding the process?
When a user initiates a Bitcoin transaction, it is broadcast to the Bitcoin network. The transaction includes information such as the sender's and recipient's addresses, the amount of Bitcoin being sent, and a transaction fee.
Once broadcast, the transaction enters the mempool, a pool of unconfirmed transactions. All nodes in the network have a copy of the mempool and can see the unconfirmed transactions.
Miners collect transactions from the mempool to include them in the next block they are attempting to mine. They prioritize transactions based on the transaction fees offered. Higher fees are more attractive to miners since they maximize their earnings.
Miners create a candidate block that includes selected transactions from the mempool.
Each block has a maximum size limit (currently 1 MB), so miners must choose which transactions to include based on their size and the fees offered.