what went wrong with my mac and cheese? when i released the pressure, the “sauce” sprayed all over my kitchen through the vent! :(

You're apparently following a bad recipe. The macaroni should be boiled separately as a first step in a larger amount of salted water, but not under pressure so that you can stir it frequently to prevent the pasta from sticking to itself. You can also better control and limit the amount of water that the pasta absorbs so that it retains some firmness in texture and still can absorb the cheese sauce and help to thicken it later. The photo seems to show waterlogged mushy pasta with a sauce that's too liquid and not thick, creamy, and flavorful, as it should be.

It's usually better to drain most of the pasta water using a colander, retaining only whatever small amount (if any) to be used for the cheese sauce. Doing so lets you control the thickness of the sauce and retain its concentration of cheese flavor instead of diluting it with excessive liquid. The cheese sauce can be made very quickly after the pasta is cooked.

A recipe that attempts to cook the pasta and make the sauce at the same time using pressure is hopelessly flawed in my opinion, with unpredictable thickening and very predictable poor texture and flavor for the pasta and sauce. Even the cheap box mac and cheese is a lot better with the mac cooked first and the sauce made second, which is why the directions on the package will almost certainly follow this method. The more expensive "deluxe" mac and cheese with the ready-to-use sauce also directs you to cook the mac first, drain, and add the sauce separately afterwards.

You can prepare a homemade cheese sauce quickly in the pressure cooker pot while the mac is briefly left in the colander to drain. It's a simplifed white sauce/gravy made with equal parts butter and flour mixed together to form a loose paste that you briefly sautee to a bubbly light brown to toast the flour, with milk slowly added to it while stirring to gradually thicken (a Béchamel French mother sauce) with cheese and seasonings added, turning it into a cheese sauce (like French Mornay sauce but with cheese other than Gruyère).

Five Mother Sauces of Classical Cuisine

/r/PressureCooking Thread Link - i.redd.it