Earlier quoted context omitted.
You could dual license as well, so it’s GPL or AGPL for personal, OSS, or academic use, but requires a paid for commercial license for commercial use. I suggest GPL or AGPL because their copyleft clauses make them hostile towards platform providers who might otherwise seek to profit from your work without paying.
Platform providers can take (A)GPL code as-is and totally profit from it without paying. As long as they keep releasing sources of their own modifications -if they ever do any-, the rest is fair play.
Not all open source licenses are copyleft licenses (e.g., MIT very much isn’t), but at the very least copyleft licenses make it much harder to exploit open source code commercially without giving back in some way, whether that’s code, or cash for a commercial license.
Not perfect, by any means, but definitely an improvement over more permissive licenses.
I am aware of how much I’m starting to sound a bit like RMS in my old age.