There is an unsupported method for choosing a custom database location. But in your case using it would be a mistake. The Joplin database is not made to be synced and trying to do so will likely corrupt the database. Corrupting the database is not the same as corrupting a note on sync, a corrupt database will almost certainly result in complete data loss (all your notes gone).
Of course, if you know what you're doing (and are willing to accept the risk). You can use the unsupported --profile flag when starting Joplin from the command line. You can search this forum for more information about using it (including how to use it on MacOS).
Ok, since I don't believe that I know what I'm doing in the sense I think you're getting at, I don't want to mess with this. Which means that I can't move the database to another folder, even if it's one on my drive that iCloud keeps track of. Knowing that saves me the trouble of entering my info into Joplin and then finding out. Thank you for the quick reply.