One resource i can recommend is hooktheory, it is about as expensive as a book, and they have some pop examples to not only understand harmony and melody but also chord progressions, and how often certain things are used. This takes you by the hand is a bit more direct then reading what a composer with 10+ years experience thinks you should do. It allows you to piece things together, and has a red thread going through, i doesnt jump around from topic to topic like many books do. Just decide if you want the app, or do it online, because they are sold separetely. I'm only advertising it, because i learned so much from it myself. I read 5-7 books on theory, but they never had that immediate impact.
As far as learning an instrument goes, do it anyway. If you can't or don't want to afford lessons, then teach it yourself. Easiest if you want to start if you want to write music is a piano/usb-keyboard in my opinion. You can get it quite cheap, you don't have to tune it, and it has a somehow intuitive representation of half-steps. You can write with a computer and just some vst. But if you want some real INSPIRATION, you quickly run into a brick wall, because a piano roll and shifting around notes is not a really direct way of making music.
There is so much to writing good music these days, so don't miss out on DAWs, mixing, mastering, there's so much to learn, the curve is steep, but it is so worth it.