The image captcha isn't even the latest version. The one where you need to click on images is from like 2014, but recaptcha v3 doesn't require any interaction from the user at all. It uses some vague analysis of user behavior (and probably tracking data from other websites, shadow profiles, etc) to determine the likeliness that the user is a bot.
There are plenty of open source "type the letters" captchas, there are also open source PoW "captchas" like https://github.com/FriendlyCaptcha (that one might only be partially open, not sure)
I believe that hCaptcha pays the site administrator, so for a Cloudflare or Discord it could be a sizable chunk of cash. Maybe not to them, but it’s something.