They don't verify transactions actually. That is what nodes do. They retrieve valid transactions from nodes, order them, and then hash them according to the consensus proof-of-work algorithm, which in this case, is SHA-256, until it produces a block that will satisfy the node consensus requirements.