Melt butter in a skillet over medium-high heat; cook and stir apples, onion, brown sugar, and cinnamon in the melted butter until onions are translucent and sauce is slightly reduced, 15 to 20 minutes. Cool before serving.