If you are using a copyleft license, especially AGPL, you may not get paid either, but you may get valuable contributions in return. It is also a good way to avoid having big companies profit from your work, if that's what you want.
If you want to make money but still want to open source, use a non-free "source available" licence (ex: "non-commercial"). They tend to be unpopular in the open source community and it is probably not the best way to get known.
And then you can have dual-licences, like GPL + commercial. Qt is probably the most popular software using that scheme.
But I don't really understand the people who publish software under a permissive licences and get forked by some tech giant and complain. That's what permissive licenses are for!