Was Texas ceded to the United States in 1848

No, Texas was actually annexed to the United States in 1845, becoming the 28th state. The territory of Texas was previously part of Mexico, but it declared independence in 1836 and was recognized as an independent republic until it joined the United States. The Treaty of Guadalupe Hidalgo in 1848 ended the Mexican-American War and ceded territories such as California, New Mexico, Arizona, and parts of Colorado, Nevada, and Utah to the United States, but Texas was already a state by that point.