In a large bowl, mix together the beef, panko, Parmesan, basil, egg, salt and garlic. Roll into 1¼ inch balls.
Using the saute function on the Instant Pot or Pressure Cooker, heat 2 tbsp of the oil in the pressure cooker pot. Stir in garlic, pepper flakes and black pepper. Cook 1 minute until fragrant.
Stir in the tomatoes, basil and salt. Cook, stirring occasionally for 10 minutes.
Use a fork to remove the basil from the pot. Scatter the spaghetti over the sauce. Drizzle the remaining 1 tbsp of water and then pour a cup of water over the meatballs.
Lock the lid and pressure cook for 5 minutes (you may need to add a minute or two depending on the pasta).
Manually release the pressure.
Stir the mixture to spaghetti strands (some might clump together). Stir in the parmesan. Cover the pot with lid (but don't lock it on) and let it sit for 5 to 10 minutes (I recommend the full 10 minutes) for the space to thicken and the past to cook to your liking.
Spoon into serving bowls. Daloop with ricotta (if using) and spring with basil and more Parmesan.
Recipe by Weekend Table at https://weekendtable.com/2019/02/02/instant-pot-spaghetti-meatballs/