Use can't help but when you can't stop yourself from doing something, then a base verb: I can't help but laugh at that show.
The phrase doesn't work for simple statements that you never do something, like I can't help but eat meat if you simply choose not to eat it. Can't help but signals an action you can't resist or stop yourself from doing, not a deliberate choice. So I can't help but check my phone the moment it buzzes works, because it's something you do without deciding to, while I can't help but skip dessert on weekdays doesn't, since skipping dessert is a choice you make on purpose.
When an action slips out despite you
Notice a friend eating alone and feel curious: She couldn't help but wonder who he was waiting for. You couldn't stop that thought from arriving, so the phrase fits, and wonder stays in its base form after but.
You keep giggling during a serious meeting: I couldn't help but giggle when the boss slid across the floor. The giggle escaped before you could stop it, so you had no real control over it.
The negation belongs to can or could, not to an ordinary verb. A phrase like I didn't help but say nothing doesn't work, because help here isn't an ordinary verb you can negate with didn't. The fixed expression is can't help but or couldn't help but, followed by a base verb: I couldn't help but say something. The phrase also describes something you couldn't resist, so it clashes with a deliberate choice like staying quiet on purpose. For that meaning, write something like I chose to say nothing.
When the meaning isn't resistance
When a reaction bursts out before you can stop it, can't help but still fits even though the trigger repeats: I can't help but tear up every time I hear that song. You'd swear you'd keep a straight face, but the tears arrive on their own.
What breaks the fit is control at the moment of acting. Choosing not to react is ordinary volition, so say I managed not to laugh or I tried not to stare. The dictionary groups this phrase under idioms for help, alongside its doing variant, not as a separate verb sense.