Learning without making money does not shield you from copyright violation, otherwise public school teachers would just start saving money by copying whole texts. We don’t live in a society where it’s okay for an 8 year old to say “but I’m just trying to learn, I’m not a business!”
And making new music which is a synthesis of your life experience with copyrighted music does not mean copyright violation, regardless if you’re making money or compensating all the authors who’ve inspired you.