Yes, Ledger is safer than Coinbase. This is mainly because it is a cold wallet while Coinbase is a hot wallet. Therefore, it is less likely to be hacked due to fewer attack vectors.