Set your Instant Pot on saute mode and when heated add the olive oil.
Add the beef and cook until almost browned.
Add the onion, garlic, carrots, celery, spices, and salt and pepper and stir well. Continue to cook on saute mode until the onions soften.
Add the red wine (replace with a splash of water or stock if you'd prefer) and scrape any browned bits off the bottom of the pot.
Remove about 2/3 of the meat mixture to a plate.
Break the spaghetti noodles in half. Add about 1/3 of the tomato sauce, 1/3 of the noodles, and 1/3 of the stock to the pot. Repeat the layers again (add 1/3 of the meat mixture, 1/3 of the tomato sauce, 1/3 of the noodles, and 1/3 of the stock), and then again.
Do NOT stir. Simply make sure the noodles aren't in big clumps as you add them, and be sure all the noodles are submerged in the liquid.
Add the lid and seal, turn the valve to sealing and set to pressure cook on high pressure for 6 minutes.
Once the pressure cooking is finished, release the pressure manually (be careful!) and remove the lid.
Use a pair of tongs to toss everything together and serve immediately with some grated parmesan and fresh parsley (optional).