Break the spaghetti in half and place it in the Instant Pot insert.
Add the minced garlic, coconut oil, 1 teaspoon salt, and the water to the pot; stir to combine and ensure the pasta is submerged.
Lock the lid and set the Instant Pot to Pressure Cook (High) for 4 minutes.
When the cook time ends, turn the Instant Pot off and perform a quick release until the pressure pin drops, then carefully open the lid.
Meanwhile, whisk together the mayonnaise, Thai sweet chili sauce, lime juice, and Sriracha in a medium bowl to make the bang bang sauce.
Stir the prepared sauce into the cooked pasta in the Instant Pot. If the sauce seems thin, set the Instant Pot to Sauté and let it simmer 2–3 minutes to thicken, stirring occasionally.
Add the raw shrimp and chopped scallions to the pot, stir to combine, then use Sauté for 2–3 minutes more, tossing occasionally, until the shrimp turn pink and are cooked through.
Taste and adjust with salt, pepper, and more Sriracha if desired, then serve warm.