You can get peach with an usmash oos after she dairs you once. If she spaces it properly, just use a hyphen smash, but it may require some predicting because missing or using it too late will get you punished.
Peach's hitboxes are huge so you have to be really careful when approaching her. She can also weave in and out with her floating ability. Her main objective is to float in the air and wait for you to attack. Simply don't attack and stay on the ground at a reasonable distance because she will also fall with a fair or a quick nair.
If you think you can get her then jump up and get a fair tipper like Maharba said because it's the only thing you can do safely when she's in the air. She can fair you, but that move is laggy so she won't challenge our fair with it. If you hesitate on the ground then she will come at you with fair. Don't try to punish this as she can cancel it into a jab so just roll away and arrow or start thinking of your next counterattack. Approaching works best from 45 degree angles because they are just out of her range of moves like dair. Normally her dair can beat our uair, but the sides of our uair will win. For the most part, do not try to punish her, Peach has abnormal spacing abilities and a lot of her moves cancel into each other.
We have to make use of Pit's good rolls in this matchup because they let us escape quickly and get in quickly.
Keep planking to a minimum in this matchup and don't just do it. You have to have smart planking otherwise, Peach will float and punish, use toad, or simply hover over you and dair because it defeats uair. She is excellent at edgeguarding with her floating so the safest thing to do if you can uair or fair her away from the ledge is to just woi to the other side and get on stage quickly.
Full hop your straight arrows and curve them downwards accordingly so you can hit her on the ground or if she's floating.
Use slow jab instead of jab infinite because she DI'd out of the infinite and punished your ending lag.
Turnip spam is hard to get around, but you can get her with some surprise angel rings or grabbing the turnip with a fair. Only tap angel ring once because holding it will get you punished. When she has a beam sword you need get in and make sure she drops it as fast as possible. Take it, or make sure it's gone. Stitch face turnips are hard to recognize until you get hit by one, but if you do then the Peach will try to regrab it and use it more wisely so watch out.
When killing, make sure that fsmash is fresh when Peach is around 125% to 140%. It will be hard to get in a bair kill because she has that air mobility so don't rely on that.
Oh, and what Maharba said about nair. It is really good on stages with platforms like battlefield. It comes out quicker than uair so sharking with it will punish more often. If you start with an uair shark at their shield then quickly change to a nair shark and you will most likely shield poke them.