You have two options to stay connected on your trip to Cuba:
Roaming
Use the roaming services of your cell company, if it has agreements with ETECSA. How to know it?
I want you to be warned: it does not usually go cheap💰
But sometimes it is affordable and has the advantage that you keep your phone number and don't have to change your SIM card.
Cubacel 3G
With your identity card or Cuban passport (or even with the passport of another country) you can get a permanent Cubacel cell line.
You don't want to get a permanent line? At the airport, upon arrival, you can buy a card to activate a Cubacel temporary line.
You already have it? Now make sure your smartphone works on the Cuban 3G network, then configure the APN Nauta, and finally dial * 133 # to buy data plans. More info.