Dice onions and carrots, peel garlic, and mince it. (Don’t worry about the exact size of the cut since the sauce will be blended.) Measure the remaining ingredients and open the cans.
Set your Instant Pot to a “sear/sauté” setting and let it heat up. Add some oil and throw in onions and carrots. Let the veggies sear for a few minutes, until softened. Add in diced tomatoes if using and cook until softened.
Mix in garlic and sauté until fragrant. Stir in tomato paste and let it sauté for about a minute as well.
Slowly stir in chicken stock, while you scrape the bottom and sides of the pot. Pour in crushed tomatoes, herbs, and seasoning. Stir well and make sure to scrape the bottom of the pot with a wooden spatula completely while you stir. (Never use a metal spatula.)(If you don't scrape the bottom well before closing the lid, it might lead to a "burn" notice. Don't worry thought if it happens, it just means that the bottom got too hot, not that your food is burned! It's a precautionary notice but check with your manual how to remedy that.)
Close the lid and make sure it is latched all the way. Turn the valve to “seal” and set the pressure cooker to cook on “high” setting for about 20 minutes. (Consult your pressure cooker manual for exact proper operations.)NOTE:Pressure cooker will take about 15 minutes to build the pressure inside first, before it starts cooking.
Once time is up, let is do a natural release for about 10 minutes and the carefully do a quick release.
Stir the sauce and turn on the "sear/sauté" again and let it simmer for 5-7 minutes to thicken the sauce a little bit. Make sure to stir the sauce from time to time.
Turn off the pressure cooker and discard bay leaves.
You can blend the spaghetti sauce or leave it chunky if you'd prefer. If you choose to blend it, please NOTE that it will be very hot, so be careful. Blend sauce in the blender or using an immersion blender until smooth. Again, be careful, you are dealing with scalding-hot sauce. (If you have time, let the sauce cool down for 30-45 minutes before blending.)