You're many years too late for this, I'm afraid
Not true. Mining can still profitable. But...
There are two types of mining ASIC mining which is used for Bitcoin and similar coins, this requires a dedicated mining rig. Bitmain S19pro costs somewhere around $10k to $15k and can return $10 to 20$ per day depending on you electricity costs the networks difficulty and the price of Bitcoin. A typical rig can be expected to last about 3 or 4 years before it becomes obsolete or breaks. So at the current prices, your looking at about 2.5 years to pay off the rig, and about an additional year to make profits, which would work out to about $5000. That works out to about 11% or 12% annually compounded return. You must also consider that these rigs are big, heavy, noisy, generate a lot of heat and require a 220v connection. It is generally not advised to operate them in your home. There are services that all ow you co-locate but this adds to the cost and thus erodes returns.
The other type of mining is GPU mining which is used for mining Ethereum and other derivative coins. The economics for GPU's is similar to ASIC mining described above but the GPU tend to cost less so you with a smaller investment.
Now the but...
Financial risk:
One needs to look at this as a financial investment, 10k with 12% return is pretty good, even at 6 or 7% inflation that leaves you with 5 or 6% real return. But there are risks, first the price of the rig is determined by the price of the crypto-currency specially for ASIC rigs. If you order one today, you likely wont get it for a few month. So what you are essentially buying is a very expensive call option on the future price of crypto. Given the price volatility, if your lucky when you receive delivery your machine could already be worth double the price you bought it, or unlucky it could be worth half. So essentially you are speculating directly in the price of the coin.
Once you start operating you are forced to continue because nearly all your cost is sunk, paid upfront, the only marginal cost is electricity. So provided that the return stays above your cost of electricity any income you make is money in your pocket, and the only mean of recovering as much of your initial investment as possible. Your ASIC will be worthless as nobody will want to purchase an obsolete machine.
Obsolescence risk:
As new ASICs reach the market and become faster at solving hashes, it drives up the mining difficulty, so the return on the hashing rate drops. This decline is not linear. New liquid cooled ASIC's are reaching the market now, so we can start expect a sudden increase difficulty in the coming month as more of those machine come online. There is no upside risk with obsolescence.
Breakage:
You are buying a machine, it can break at any time. Any stoppage impacts you returns. If you need to wait a week for a replacement part, then that becomes one week less of income. Not to mention the cost of the replacement parts. And critical failure is also possible, if the machine dies, your out 10k minus what ever returns you managed to earn.
Ethereum's move to proof of stake and the ultimate obsolescence:
In 2022 (yes this year) Ethereum is planning to move from mining to staking, if that day ever comes the mining rigs will immediately become worthless. They say "But they are GPU's I can always sell them to gamers!", um no. This will create a glut in the market dropping the price of new GPU's and flood the secondary market with GPU's from miners that nobody will want because they will have been driven to near death. So no your GPU's will be just as worthless as an obsolete ASIC.
With a 3 year payback it seems nearly impossible that mining Ethereum can be profitable, but prices don't reflect that. And you still hear of companies investing in new Eth mining rigs. So either people are irrational, or ETH2 (PoS) is never coming. You decide which you want to believe,
The bottom line is that mining crypto-currency is not without risk, and when you account for the risk, the returns are not as good as some may make them out to be. My feeling is, if you want to speculate in the price of Bitcoin, just buy Bitcoin, or Ethereum.