It depends which cloud mining. As a plain contract — the kind most people picture — usually yes. As an owned, resellable hashrate position, no: it can beat holding. Same activity, two very different products, and the whole comparison turns on telling them apart. Buying Bitcoin is clean: you own BTC, it's fully liquid, and when the price moves you feel the whole move immediately, on all of your capital. A traditional mining contract can't say any of that. You pay upfront, you receive BTC slowly over the term, you pay running costs the whole way, and at the end you're holding nothing you can sell. In a market that's rising quickly, a strategy that only drips in exposure will lag one that had full exposure from the start.
So when someone says "just buy Bitcoin beats cloud mining," they're usually right about the product they're picturing: the illiquid, fee-heavy contract. The mistake is treating that as the verdict on all mining. It isn't. It's the verdict on mining with one engine removed.