Read the GarageBand license terms.
I googled
garageband license terms and a top hit was this:
https://support.apple.com/en-us/HT201808
The GarageBand software license agreement says:
"GarageBand Software. You may use the Apple and third party audio loop content (Audio Content), contained in or otherwise included with the Apple Software, on a royalty-free basis, to create your own original music compositions or audio projects. You may broadcast and/or distribute your own music compositions or audio projects that were created using the Audio Content, however, individual audio loops may not be commercially or otherwise distributed on a standalone basis, nor may they be repackaged in whole or in part as audio samples, sound effects or music beds."
So don't worry, you can make commercial music with GarageBand, you just can't distribute the loops as loops.
If there's some part of that which is unclear, point to the specific part.
The license agreement may differ for different countries, I don't know. The thing to do then is to state which country one resides in, and read the specific terms for that country (if any).