DIAGNOSIS Yeah, this is a classic issue with stovetop pressure cookers. You're either doing a quick release with starchy or foamy contents (like beans, pasta, oatmeal) or not controlling the valve correctly.
FIX For most foods, the best method is "controlled quick release." Move the cooker to your kitchen sink. Using a long-handled spoon or tongs, slowly nudge the pressure regulator weight to the venting position. Don't just knock it off. Let the steam blast out for 2-3 seconds, then cover the valve loosely with a dry kitchen towel to catch the initial spray. Once the fierce jet subsides, you can leave it to vent fully.
IF THAT DIDN'T WORK For foamy foods, you shouldn't quick release at all. Do a natural pressure release (just turn off the heat and let it sit for 10-20 minutes) until the float valve drops on its own. This prevents the foamy liquid from being forced up through the valve.
HEADS UP Never cover the valve with a wet towel or put your face/hands directly over the venting steam. The towel is just a shield for splatter, not a plug. And always point the vent away from cabinets, walls, and yourself.