Some transactions take more space than others, depending on a few factors like if its a native segwit transaction, how many UTXOs had to be used, how many outputs there are. You could have a block that only fits 100 transactions, and another that fits 3000, just due to the size of the transactions; ...