Self hosting in 2022 is not exactly a walk in the park. Besides the obvious security risks of data loss/theft through exploits, you also have a challenge making anything as redundant as a cloud service.
Most major cloud services offer multi geographical redundancy, meaning if one data center completely vanishes (like the OVH fire), your data is safe in another data center, and hastily restoring redundancy to yet another data center.
You get versioning as well, i.e. OneDrive offers unlimited versions for 30 days, allowing you to roll back your entire account to a date 30 days in the past in case of malware attacks.
Add to that redundant hardware, power, internet, spare parts, physical access control, fire prevention and more.
On the other side of the fence, we have that old gaming PC that has been repurposed as a "home server", running Unraid, or slightly better TrueNAS in Raid-Z1, and not a backup in sight because "raid". Furthermore it probably hasn't been patched in months unless it defaults to auto updating.
I'm well aware that there are people that are serious about self hosting (i used to be one), but the above repurposed gaming PC is what you'll get in A LOT of the cases.
And to top it all off, with electricity prices in Europe as they are right now, the cloud is cheaper than running your own hardware, except of course for multi TB storage. A 4 bay Synology consuming 45W costs about €18/month in electricity alone, and a 60W server costs €23.5/month.