Heat a large skillet over medium heat and add the butter, letting it melt and shimmer.
Add the thinly sliced onions to the skillet and cook, stirring frequently, until they start to soften and turn translucent, about 5 minutes.
Reduce the heat to medium-low and continue cooking the onions, stirring occasionally. Let them caramelize slowly, stirring every few minutes, until they develop a rich, golden-brown color and become jammy, about 20-25 minutes.
Remove the skillet from the heat and let the caramelized onions cool slightly for a few minutes.
Transfer the caramelized onions to a mixing bowl and fold in the sour cream until well combined and smooth.
Season the dip with salt and pepper to taste, adjusting the flavors as needed.
Stir the mixture until everything is evenly combined, then transfer to a serving bowl.
Serve immediately with chips, vegetable sticks, or as a spread for bread, enjoying the rich, sweet onion flavor and creamy texture.