Heat butter or oil in a large skillet over medium heat and cook the onion until soft, about 3–4 minutes.
Add minced garlic and cook for 1 minute more, stirring frequently.
Add shrimp to the skillet and cook until pink and opaque, about 2–3 minutes per side, then remove and set aside.
In the same skillet, add the corn kernels and cook until warmed through and slightly tender.
Pour in heavy cream and stir to combine, then simmer for 3–5 minutes until slightly thickened.
Stir in Parmesan or cheddar cheese if using, then season with salt, pepper, and optional paprika or cayenne.
Return shrimp to the pan and gently stir to coat with the creamed corn mixture.
Serve warm, garnished with chopped parsley or green onions.