I'm trying to understand the transaction flow in the smart contract between a seller and a buyer. As far as I've looked, whatever transaction is made between the seller and buyer, the ether is stored in the contract's balance, and from there the seller has to withdraw. is there a way that seller can receive ether directly from the buyer without having to withdraw from the contract's balance?
There are two ways in which a seller can receive ether from the buyer. The first one is the one you mentioned, via the smart contract. In this case, the smart contract might specify that ether should be transferred from one account to another if certain data is received or a certain event occurs. The other way is when the buyer transfers the ether directly to the seller's wallet address within the Ethereum network.
The seller can receive ether directly without having to withdraw from the contract's balance if the buyer is sending ETH directly to the seller through an externally owned account (e.g. Metamask), not through smart contracts. If the seller can receive ether directly from the buyer, there is no need for the smart contract to store the balance. Smart contracts are digitized, self-executing agreements that take place of an intermediary or financial middleman using blockchain technology.