Reflect his Gordos.
Be wary of his disjoints.
Never challenge his smashes.
If you have to land, aim for the edge.
That's the basic stuff. What you need to remember here is that Dedede can be difficult to approach, due to his Gordos and disjoints, but he's combo food if you can get in on him. Dash attack and b-air are totally invincible, which can make for a good approach if he's determined to stonewall you. Jab1 -> d-throw can set up for n-air or u-air, both of which can catch him easily with his massive hurtbox.
Off-stage, you can try to reflect his Gordos or go for a n-air or b-air to stage-spike, or you can just aim to ledgesnap with Warp so he can't hit you. Be sure to mix up your recovery trajectory so he can't read and intercept you. If you have to edgeguard him, same rules apply; if he recovers, wait 'til he lands and then punish with an aerial.
Dedede is a good defensive character, but he's vulnerable to combos if you can get in his face. Just be patient and exploit him whenever you can catch up to him.