Un ratito is the diminutive form of un rato (a while), meaning "a little while". This small change adds a sense of intimacy, casualness, and fleetingness, which is central to the song's theme.
Bad Bunny uses this phrase to set the expectation for a brief, no-strings-attached encounter, singing "Esto es un ratito, Mami, no te acostumbres" (This is just for a little while, baby, don't get used to it). Understanding this key phrase unlocks the entire story of the song.
Bad Bunny is famous for being brutally honest in his songs, and "Un Ratito" is a perfect example. He's telling a woman directly that their time together is just for a little while. He warns her, "Esto es un ratito / Mami, no te acostumbres" (This is for a little while / Mommy, don't get used to it). He's not trying to be mean, he just has a pretty pessimistic view on love, saying it's beautiful but something always gets in the way.
He tries to make her feel special by saying he doesn't sleep with just anyone, but at the same time, he keeps his distance. He gives the classic excuse that his life is too complicated and unstable for a real relationship. He even says, "Pa' mí que yo nací pa' estar solo" (I think I was born to be alone). It's a song about someone who enjoys the moment but is afraid, or unwilling, to commit to anything more.