Set a 6-quart multi-functional pressure cooker (such as Instant Pot®) to Saute function. Add bacon and cook and stir until brown and crispy, 6 to 8 minutes. Transfer to a paper towel-lined plate, leaving any scraps and grease in the pot. Add onions and garlic. Cook, stirring frequently, until onions are translucent and garlic is fragrant, 2 to 3 minutes. Stir in bacon, potatoes, corn, vegetable stock, thyme, cayenne pepper, then the salt and pepper.
Close and lock the lid. Select high pressure according to manufacturer's instructions; set timer for 10 minutes. Allow 10 to 15 minutes for pressure to build.
Release pressure carefully using the quick-release method according to manufacturer's instructions, about 5 minutes. Unlock and remove the lid.
Whisk together heavy cream and flour in a small bowl. Set aside.
Select Sauté setting and bring to a boil. Stir in the heavy cream mixture and cook, stirring frequently, until mixture is slightly thickened, 4 to 5 minutes. If mixture is too thick, add additional vegetable stock as needed to reach desired consistency.
Garnish with shredded Cheddar cheese and green onions. Serve immediately.