I am reading ERC20 protocol and learning how that is implemented from OpenZeppelin: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
The code demoed how fungible tokens created using the Ethereum blockchain. But what I am confusing is that how that relates to the Ether balance on the accounts in Ethereum network. When transferring ethers, we use payable(...).transfer method in Solidity but I can't find anywhere it is used in the ERC20 implementation.
If ERC20 is only about token exchange, how should we implement purchase tokens by ether?