Put Instant Pot on the saute feature and add olive oil to the pot. Add onion and shredded carrots and saute for about 5 minutes. Season with salt and pepper. Add garlic, oregano, red pepper flake (if using), and fresh basil leaves and saute for about 30 seconds to 1 minute or until fragrant.
Add red wine and simmer for about 2-3 minutes. Add crushed tomatoes, season with salt and pepper, and stir to incorporate ingredients fully.
Put on the Instant Pot lid and make sure that the steam valve is in the closed position. Switch the function to manual high pressure and cook for 25 minutes. Manually release steam. If you prefer a smooth sauce, blend using a blender or you can leave it chunky.
Notes
You can keep the marinara sauce in the fridge for 3-4 days or freeze for up to 3 months.