I would actually say to stay away from learning too much theory at first, since you might become a stickler in terms of rules, and you won't have any individuality. Write a bunch of "wrong" stuff first, before you learn compositional devices and theory. I feel like you should use theory to "enrich" your compositions, not to create them.Anyway, composing can be super frustrating because you don't control when it happens, it kind of just happens. I recommend listening to a ton of music until you kind of just have music running in your head all of the time. Then you'll eventually start to hear your own stuff going. Then just write down what you like.