In a medium saucepan, heat the chicken or vegetable broth over low heat. Keep it warm but not boiling.
In a large skillet, heat the olive oil over medium heat. Add the diced pancetta and cook until crispy, about 5-7 minutes. Remove the pancetta from the skillet and set aside, leaving the rendered fat in the pan.
In the same skillet, add the chopped onion and cook until translucent, about 3-4 minutes. Add the minced garlic and cook for an additional minute until fragrant.
Stir in the Arborio rice and cook for 2-3 minutes, allowing the rice to toast slightly and absorb the flavors.
Pour in the white wine and stir continuously until the wine is mostly absorbed by the rice.
Begin adding the warm broth, one ladle at a time, stirring frequently. Allow the rice to absorb most of the liquid before adding the next ladle. Continue this process for about 18-20 minutes, or until the rice is creamy and al dente.
Stir in the sweet corn, butter, and grated Parmesan cheese. Season with salt and pepper to taste. Cook for an additional 2-3 minutes until the corn is heated through.
Serve the risotto in bowls, topped with the crispy pancetta and garnished with fresh basil or parsley if desired.