Well, for starters, getting better comes with playing the game more. But playing it the right way... That means no more lv. 9 CPUs and less For Glory. Playing the game casually at first doesn't hurt, as I'd recommend playing all the characters in the game to get a basic understanding of them. Just getting a grip of the game, mechanics, and characters on a basic level will do you wonders.
Testing things on your own, researching characters on the boards, and learning the strengths and weaknesses of them will help, but putting it into practice is key, which is best done by going to tournaments, which means you'll probably lose a lot at first.
But it's important to learn fundamentals, overall fighting game mindsets, Smash specific mechanics, and more. There's a lot that can go into it, so my advice is to study a lot online, play a lot, and compete a lot. That's all there is to it.
It even helps playing not just other characters, or other Smash games, but playing different fighting games entirely to or at least attempt to understand them to get an understanding of basics like spacing, approaching, footsies, etc.
Anther's Ladder is a matchmaking site online. Giving it a quick google search should get you there.
I will be locking this thread as this is more general tournament advice and doesn't address necessarily the exact problems you're encountering to specifically better your Sonic. If you have more questions, ask in my
FAQ thread, but make sure you read our stickies in full first to get a start on learning Sonic.