Pentagrama literally translates to "musical staff" or "stave" in English. It's a specific musical term that refers to the five horizontal lines on which musical notes are written.
In the song, the artist uses pentagrama to connect the end of a relationship with the creation of music. The line "Y en el pentagrama, Melodía y drama en su fin" suggests that the heartbreak and drama of the relationship's end are now being transformed into a melody, giving a poetic and artistic twist to the breakup.
"Y en el pentagrama / Melodía y drama en su fin" (And on the music staff / melody and drama at their end) is the hook, and it lands because "pentagrama" and "drama" rhyme hard enough to turn a breakup into a piece of sheet music that simply ran out of bars. Charles Luis sings it over DJ Husky's bachata guitar, so the ending arrives sounding almost pleasant.
The verses are colder than bachata usually goes. "Fuimos extraños en la cama y así" (We were strangers in bed, and just like that) skips the shouting entirely and starts at the part where two people have stopped recognising each other, and "Se fue el amor por la ventana" (Love went out the window) is delivered like a fact about the weather. Then the bridge turns generous for four lines: "Vas a estar bien / Seguiré de pie" (You are going to be fine / I will still be standing). He is almost certainly lying about the second half.