Often I hear about the Mexicans oppressing the Texans. I hear three main forms of oppression.
However you rarely hear anyone talk about slavery!
The Texas revolution happened 5 years after Mexico abolished slavery!
Why isn’t Slavery the main cause for the war with Mexico?
Any attempt answer to this inevitably has to begin with the question of "According to whom...?".
American historians often regard this as a primary organizing mode of Texian (anglo-) society and ultimately, one of the major factors in the mexican-anglo political division that led to the revolution. Shortly after accepting that, disagreements abound. These disagreements largely stem from the two different modes of research:
Studying the anglo revolutionaries who have so completely dominated popular narratives. The prominent political leaders of Texas were indeed intimately concerned with the preservation of slavery, texan identity, and to a lesser extent the issue of (con-)federalism.
Studying everyone else, for whom the issue of slavery was not necessarily irrelevant, but rather one issue among many (often of more import).
Historians in the latter school would point to prior conflicts (for example the Fredonian rebellion) and nearly concurrent independence movements elsewhere in Mexico like the Yucatan republic. These conflicts illustrated that fundamental disagreements over the power of Mexico's central government in the country were ongoing for decades before and after the Texas revolution. I've discussed this in previous answers, but those links have been lost to the void. One argument along these lines is Schlereth's "Voluntary Mexicans" in Contested Empire [2], which argues that contemporaneous ideas of Mexican citizenship inherently allowed justification of revolutionary sentiments and other stated causes were simultaneously meaningful and convenient.
In popular culture though, the question of slavery is much less prominent. Popular understandings often follow Turner's frontier thesis and Barker's martyrdom of the Alamo. You're already familiar with this narrative, so there's not much to say about it except that it's became a mythos for the sorts of texans that set textbook standards.
To get back to the underlying question, most historians acknowledge that slavery was very important to anglo revolutionaries at the time of the revolutionary. However, the framing you've given, where slavery was the sole and primary cause of the revolution, ties Texas into American narratives rather than understanding them in the context of early modern Mexico. Instead, let's look at the mexican tyranny angle, a long-standing complaint of prior revolutionaries (e.g. the Long expedition). In post-independence Mexico, the issue of federalism and the strength of the central government was the critical issue of the day. This issue was especially important in the loosely held territories of Northern Mexico, which by the 1930s had become a warzone as conflict with indigenous groups left whole regions ruined and depopulated [3]. The failure of the central government to protect them from these and other conflicts led to questions about the effectiveness of the system as a whole. Simultaneously (and making use of legal precedent), the Mexican government had established colonial policies on the northern frontiers to stabilize the area, inviting in any who could make it work. Farther south in central Mexico, conservative factions attempted to centralize the nation away from the federalist Constitution of 1824 with the new Siete Leyes (Seven Laws) in 1835. Shortly thereafter, Zacatecas, Sonora, Alta California, the Yucatan, Tabasco, and Texas all had federalist rebellions. In Texas and the Yucatan, federalism also fell along lines of identity, a component of which in Texas for Texian society was the preservation of slavery. While slavery may have been the ultimate cause of later conflicts with which Texas was involved, by the time of the revolution it was simply a proximate (though important) cause.
[1] Torget, A. J. (2015). Seeds of Empire: Cotton, Slavery, and the Transformation of the Texas Borderlands, 1800-1850. UNC Press Books.
[2] Cantrell, G., Schlereth, E., Soto, M., Fowler, W., & Greenberg, A. S. (2015). Contested Empire: Rethinking the Texas Revolution (Vol. 46). Texas A&M University Press.
[3] DeLay, B. (2008). War of a Thousand Deserts: Indian Raids and the US-Mexican War. Yale University Press.
I asked a similar question a year ago.. u/Milkhemet_Melekh gave a very good, detailed answer.