You can earn 2% directly on coinbase [0] or 3% on compound [1] (actually closer to 6% if you include selling the governance tokens you receive - with some additional shenanigans you can push this up to 20 - 30%, but that would require a longer post). One neat thing about compound is that your returns can technically be considered capital gains rather than dividends, which is beneficial if you hold longer than one year.
Risk rise, you're holding DAI for both approaches, so you are exposed to smart contract risks from Makerdao + some market based risks (in cases where there are very large price swings). With compound, you take on additional smart contract risks from the compound platform.
[0] https://help.coinbase.com/en/coinbase/trading-and-funding/ot...
[1] https://app.compound.finance/