In a very short period Spain lost all of their colonies but Cuba seemed to stay the same. I am aware of some failed uprisings throughout the 19th century but what prevented them from succeeding.
Spain retained control of Cuba for several reasons, but mostly 1) the calculated self preservation of its elites, 2) its insular character, which made it difficult to attack for nations (Mexico, Colombia) without real, powerful navies, and 3) pressure from non-Hispanic nations to keep Cuba Spanish.
First, calculated self-interest. When the Haitian Revolution destroyed the booming plantation economy of French Saint Domingue, Cuban (specifically Havana native) elites were extremely quick to fill the breach. While plantations producing sugar and other tropical goods had existed from the 16th century, policy changes (such as tax exemptions for a certain number of years after starting a plantation) combined with the means (plenty of fertile tropical soil) and the perfect commercial context (the collapse of Saint Domingue's production) all led to the plantation boom of the late 18th and early 19th centuries in Cuba.
Up until the early 19th century, Cuba had been a net loss for Spain (when calculating the cost of administration and maintaining an active military force on the island). It was only in the black thanks to money sent from New Spain (now Mexico).
Under first the Bourbon reforms of the 18th century, which helped, and later the opening of the island to neutral commerce definitively (from c. 1810s onward), the Cuban plantation elites were ecstatic. In addition, key members of the colonial elites, such as Francisco Arango y Parreno (the mind behind many of the colonial reforms), were able to obtain positions of power and influence within the colonial government and even in Spain itself, leaving them feeling contented and that their opinions were being taken into account. (If you can read Spanish, try Moreno Fraginal's mind blowing book Cuba/Espana Espana/Cuba: Una Historia Comun, which goes into detail over how the elites were incorporated into the colonial government).
When Fernando VII was captured in Bayonne in 1808, along with the rest of the royal family, many of the colonies organized special juntas (counsels) to govern given the collapse of traditional sources of authority (e.g. the King) and the co-opting of many of the traditional institutions (e.g. El Consejo de Castilla) by the new Napoleonic regime. Many of these movements took their sweet time in becoming separatist, or at least declaring their separatist intentions. In Cuba, the Junta that some elites tried to form quickly collapsed. I would have to double check Olga Portuondo's Cuba constitución y liberalismo (1808-1841) for the exact story of what happened (it has been a few years), but suffice it to say that its brief existence was of little consequence.
In the 1810s, as the independence wars ravaged continental Hispanic America, Cuba lived in the midst of an economic boom, with relative peace (conspiracies cropped up now and again, such as Aponte's in 1812). None of the elites had forgotten what had happened in Haiti and were horrified by the idea that independence would lead to a repeat of the Haitian Revolution. As refugees from mainland Hispanic America arrived in waves, carrying with them the horrors of seeing their possessions destroyed and their workforce (slaves in particular) rise up and take up arms for this or that side, it tended to cement the idea that rebellion would result in disaster. Thus, largely happy with their circumstances and worried that political action would result in their ruin, powerful Cubans who would have been the ones to lead and finance a rebellion decided to sit this one out instead.
Spain very astutely played on these fears for the next several decades, letting the idea spread that they would rather emancipate all the slaves and destroy rebellious white creoles, and then rule over the ashes, than to let Cuba slip away from its grasp.
There were two other tendencies among the creole elites. One was annexationism (which supported joining either the US, Mexico, or Colombia, after breaking away from Spain). Cuban nationalism was still in an embryonic stage at this point, and even separatists were aware of the dangers of having such a large slave population without the possibility of support in case of an uprising, so it was acceptable to many to join a neighboring country. We will deal with what fractured this group later on. The other was full, insular independence (end Spanish rule, don´t join any other country), but it had very, very few supporters at this time.
Cuba´s geographic situation didn´t help matters. Bolivar was able to cross into and Liberate modern day Colombia, Ecuador, Peru, and Bolivia, because he just had to march his men there. Invading Cuba required a full on fleet. And one capable of both landing massive numbers onto the island and supporting them in besieging major island fortresses, such as La Cabaña, in Havana. Thus any attempt would require a lot of preparation and would have such buildup that Spain would know they were coming with weeks if not months of time to prepare.
What annexationist sentiments remained towards the US were quickly snuffed out by consistent rebuffs by the Monroe and Adams administrations, who thought that (with the War of 1812 so close), an attempt to annex Cuba (which they wanted to do anyway) would just result in destabilizing the island resulting in a) another Haiti or b) the takeover of the island by a major maritime power (See exhibit A: Great Britain). Thus when Bernabe Sanchez and a group of annexationists approached them in c. 1822, the answer was basically "thanks for the thought, but please don´t rebel right now". Similar instructions were given to basically every US official sent to the island during this period. (Keep in mind that this is the short version, and that annexationism would continue to be a reputable position for most the rest of the 19th century)
Annexationists supporting connections to Mexico or Colombia were unsuccessful because those fleets never invaded. Why? Because the economies of both countries were on the brink of collapse after almost two decades of civil war, the internal political situations of both countries were deteriorating rapidly after independence, and because the US and (to a lesser extent) the UK were opposing an invasion of Cuba. The US was clumsy but firm on this point: Do not invade. There were even hints that the US would support Spain if need be, to keep radical rebels like Bolivar from inadvertently destroying the Cuban plantation economy. This defused the potentially game changing implications of the Congress of Panama (c. 1826) which was to discuss, among other things, the liberation of the Antilles in order to end Spanish attempts to reconquer the mainland. (note that several major conspiracies did get quite far, with Soles y Rayos favoring Colombian annexation and Aguila Negra favoring Mexican annexation, but were snuffed out in the mid 1820s)
After the Congress of Panama failed, first Colombia and then Mexico underwent periods of economic collapse (consequence of the civil wars, instability, and debt crises). Independence through invasion by mainland Hispanic American Republics was now off the table. Some discontent remained, such as Liberal Cubans who disliked the return to absolutism and reaction in Spain after the two Liberal periods (1812-1814 and 1820-1823 respectively), but for the moment most were largely content and overall hopeful of continued fruitful collaboration with Spain. Fear paralyzed many potential separatists, who couldn´t help but think of the devastation in Haiti or even in Mexico and Colombia, that revolutions had brought, and the vigilant eyes of Spanish officials were able to notice and arrest and execute those crazy enough to try to organize separatist conspiracies.
Reformism was the way to go until the late 1830s (c. 1837) when Spain creates a Liberal constitution which begins the legislative, economic and true political subordination of Cubans to mainland Spain. After this numerous other reformist pushes were made, culminating in the failed Junta de Información in the mid-1860s, attempting a new modus vivendi with Madrid, but all to no avail. After this the two Independence wars came and went, only resulting in Cuban independence during the second of the two (1895-1898) thanks to American military support.
I'd start with Philip Foner's book on US-Cuba relations, which summarizes all of these events. His source is mostly the rare and ponderous volumes of Herminio Portell Vila (Cuba en sus relaciones con los Estados Unidos y Espana). Something that is actually available for free, online, due to expired copyright, but which gives an interesting political blow by blow of separatism is Jacobo de la Pezuela's Historia de la Isla de Cuba, in 4 volumes. I think 3 deals with the early 1800s, though I must warn you, I don't think it has ever been translated to English.
Lars Schoultz's masterwork, That Infernal Republic of Cuba, is a recent scholarly work, and although it focuses on the 20th century it touches upon the US' role in impeding independence in the 1800s.
Rafael Rojas' book Republicas de Aire is also an interesting take, though it is probably only in Spanish.
/u/ThucydidesWasAwesome might have something to say on this topic.