How can one read the value of a wallet from the blockchain? It seems like the blockchain transactions only stores the number of coins moving from one wallet to the other, but does not have the total amounts for each wallet.

Therefore it seems like if you want to get the value of any given wallet you would have to read every transaction in the ledger from the very beginning.

Is this correct or am I missing something?

Fyi, my goal is to understand the format of the blockchain better
Assuming you don't trust anyone, you need to read the entire blockchain history once to generate your own set of unspent transactions (UTXOs). You won't need then to read again the full history every time you want to see your balance. Unspent Transactions are enough to do so.

Your balance is the sum of the values of the unspent transactions your wallet has. Unspent means here that you didn't "spend" the previously received amounts on outgoing transactions.

Example:


Alice sends you 1 BTC. you now have an unspent transaction of 1 BTC. Your balance is the sum of unspent transactions, i.e. 1 BTC
Then Bob decides to send you 2 BTC. You have now two unspent transactions associated to your wallet, for a total balance of 3 BTC.
Let's assume now you want to send 1 BTC to Charlie. After checking that you have at least 1 unspent BTC (which is the case), your transaction would be processed and the amount that you spend would be removed from your "unspent" transaction. In that case, the transaction received from Alice would be now marked as spent and would be removed from your list of unspent transactions.
Your balance is still the sum of unspent transactions, i.e. 2 BTC (from Bob)