Drain the jackfruit from its water/brine and soak the pieces in a bowl with cold water for 30 minutes. Rinse well the jackfruit and drain.
Meanwhile dice the carrot and the onion.
Turn on the Instant Pot on sauté mode. Add the oil, the carrot and the onion cubes, the jackfruit chunks, fennel seeds, chilli flakes, stock cubes (crumbled with the hand), and the bay leaves. Give it a thorough stir, then cook for 5-7 minutes.
Pour the water then turn off the Instant pot and set it on "pressure cook" mode. Make sure the valve is on seal, and set 10 minutes. Times are the same for the traditional pressure cook (10 minutes after it comes to pressure) and 30 minutes on medium heat with the lid on for regular pots.
Turn the valve on venting for a quick release and remove the lid after all the steam has escaped.
Add the lentils, the garlic and salt to taste.
Cover with the lid and set another round of pressure cook for 10 more minutes (25-30 minutes if you're using a regular pot).
Allow a natural release for 15 minutes.
Remove the Instant Pot lid, give the stew a thorough stir and serve it accompanied with some steamed or boiled rice, or any grains or pasta of your choice.