Your problem was you were either trying to spot dodge or roll away and that's a no no.If you encounter an opponent who is heavy reliant on projectiles like this Mario then u perfect shield them. Most Marios spam fireballs to get a grab, in this case perfect shield and then jab If they are really close or even perfect shield and grab.I've been having a hard time with Mario, should I be getting closer and countering his fireballs? Any other critiques welcome!
https://www.youtube.com/watch?v=0j2XG79KAwo
https://www.youtube.com/watch?v=_z32Bd8tDAY
What will also help u not get walled out by fireballs is short hopping over them towards your opponent and coming down with a well spaced Nair. This way you are gaining stage control and pressuring him/her. If your opponent starts shielding them Short hop over them into a grab or cross up Nair.
Takes some practice, but not that hard. Try to mix up your approach game and don't stay on the ground so much. Incorporate more aerial approaches in your game. Pressure the Mario with Nairs, tilts, jabs. Space him out and force mistakes.