When a miner creates blocks, do transactions in that block affect the result? For example, if a miner creates a block, but now a new transaction is broadcast on the network, will the miner stop current work, then add the new transaction as one of the inputs, then recreate the block?
There's no such thing as 'aborting'. It's all random anyway. The chance of solving a block on the first try is equal to the chance of solving one on the 1000th try.
It's like the difference between picking the same lottery numbers all your life or picking different ones each week. There is no difference.
The miner won't stop the hash generation of their block. Even with new transactions coming in, they'll add them to their block until the hash is found. It could happen with only 20 transactions or with 400. The difficulty is so large that it's pretty random. So it's not like they get a set of transactions aside and work on those. They keep on working as transactions come in until they find the hash.