If a pup is conscious and choking on something, trying to get it up, much like with humans, let nature take its course. You can do a modified Heimlich maneuver by pressing below a dog or cat’s rib cage in time with their own thrusts to throw it up. Just as with a human, be sure the thrusts are below the ribs.
You can do this between your thighs for a large dog, under your arm for a small dog or a cat.
If the animal goes down, straighten out its neck and pull its tongue out between its front teeth so you can look down its throat to see if there is a blockage. Use the light from your smartphone to see, If the animal is unconscious, but ONLY if the animal is unconscious, you can reach in and pull it out.
Never put your fingers into the mouth of a conscious animal in distress. That may become your ticket to the human ER.