Marth on average is my best matchup, learn to DI. DI'ing the right way can make Marth's life extremely hard, if you get grabbed open with the down and away DI option and see if they follow up on it. If they start wavedashing fsmashing then mix it up and DI in on a throw to avoid being tippered. If you can get good enough at figuring out his fair patterns you can drift ever so slightly out of range of his fair and drift right back in and punish it with a bair really easily. I recommend if you want to get good at this matchup then watch
https://www.youtube.com/watch?v=h7IkCDl9Fqg
This is single-handedly the best video explaining the matchup I've seen to date. What are my credentials to being good at this matchup? There isn't a Marth in my state that has beaten me in a long time (not including PPMD, haven't played him).
Also remember that you can rest Marth's normal grab animation if you crouch it but good Marth's will dash grab (dash grab can grab you while crouched) against you if they are dash dancing etc. You may be able to catch them grabbing OoS and you rest that. Sometimes against some Marth's that are fair happy you can run up or wavedash and shield really fast as they try to fair you and punish with a nair/fair OoS. If a Marth likes to dair OoS you can call it out with a shield and punish with just about any move (even rest if they mis-space their landing), also if you get Marth at the ledge spacing bair is sick because they have a tough time getting back to center stage which is where Marth shines in the matchup.
Learn good ground movement with Puff if you want to make leaps and bounds in this matchup, by most people I'm known as one of the more technical Puff's in my area. Watch Hbox play any matchup and you'll see how he abuses wavedash just to get that extra spacing all the time. Staying high in the air vs Marth is generally a no no but you can use it to get a platform if you feel the need to re-position yourself. Some Marth's will hold their shield until it dwindles down a bit, you can shield poke really easily with nair on their head if they don't really DI (because it's usually catches them off guard), at certain percents weak nair will lead into an fsmash if you autocancel nair.
Finally if you've kept reading to this point, watch the video to learn how to edgeguard Marth, super important to make the Marth feel under pressure while recovering and give you an advantageous position.