Coinbase Global In. in its first months as a public company has built a $4 billion cash stockpile as it benefits from a trading frenzy and prepares for closer regulatory scrutiny.