Based on my understanding, the blocks are made up a group of transactions. But somehow, the network needs to both agree on which transactions are part of the block and also (I would think) the order of these transactions. How is this done? I assume there are lots of transactions going on and I don't know how all parts of the network know exactly what constitutes the next block.
The network does not need to agree on what the next block looks like, until it has been mined. Miners act independently to create new blocks, each miner can (and probably will) include slightly different transactions, in a slightly different order, in the block templates that they are mining on. In fact, a miner could fill a block up entirely with otherwise unbroadcast transactions, that no other node on the network would have knowledge of before that miner published a valid block containing said transactions to the network.
The blockchain record is the method by which the network comes to independently agree on the specific ordering of transactions. Until the time at which a new, valid block is added to the chain tip, nodes on the network will not know what the next block will look like.