Capricho translates to "whim" or "craving." It describes a sudden, often unreasonable desire or a passing fancy. It's a more nuanced word than a simple "desire" and implies a certain impulsiveness or even stubbornness.
In "Miami," the lyric "Y el dolor es un capricho que consiste en olvidarte" (And the pain is a whim that consists of forgetting you) uses capricho to convey that the pain of forgetting his ex is not just a feeling, but almost a stubborn, self-imposed indulgence or a fleeting, yet persistent, desire to move on, even if it's difficult.
Have you ever messed something up and only realized what you lost after it was gone? That's the heart of CNCO's song "Miami." The track is a classic tale of post-breakup regret, sung from the perspective of someone who knows he's the one to blame. He admits, "Yo fui el estúpido que la jodió" (I was the stupid one who messed it up), and now he's left watching his ex-girlfriend thrive without him.
Throughout the song, the singer is filled with longing and nostalgia for a romance that ended in Miami. He sees his ex looking beautiful on her social media stories and admits she's better off since he left ("Se puso mejor desde que me fui"). Despite this, he can't shake his loneliness, confessing, "Esta noche me hace falta tu calor" (Tonight I miss your warmth). It's a story about realizing your mistakes too late and wishing you could turn back time, even when you know the other person has already moved on.