I know this sounds weird, but this has been happening to me lately. ill write a pretty cool riff, or song or something, then later, ill be listening to music, thinking "wow this is such a cool/band, i wish i could be sound like this." that sounds like inspiration, but it just makes me feel like im not good enough at writing music. maybe i need to quit comparing myself to others, idk, has anyone else experience this?
It's not a problem... it's called being human. Frequently I'll listen to other people's songs and think that "I'll never be at that level", or "I wish I could write like that", but I've come to realize that I have my own style for a reason and don't want to change it.

It'll take some time, but you'll eventually enjoy your own music for what it is rather than what it could be.
everyone has that problem
usually when i write something by the end of it i hate it then i hear something else and i hear something else and thing why the hell cant i write something like that
Dude, this happens to everyone, believe me. I've trained myself so when i get that feeling, it makes me want to practice three hours a day until I write something as good as what i heard. I recommend it to every musician.