Texas became a state immediately when it was annexed, but Hawaii was a territory for 50 years first even though it was also independent like Texas. Why weren't they both states right away?
The Republic of Texas was legitimate country for almost a decade, recognized by several foreign powers before it joined the US by treaty.
The "Republic" of Hawaii was never recognized diplomatically by anyone. It was created by American businessmen after they overthrew Queen Liliʻuokalani, as a proxy government to make themselves look official while they waited for American Marines to show up and annex the islands. Hawaii was more or less forced to join the US, and the American government didn't want to grant statehood to a far-flung island chain, especially since at that point some of the continental US was still territories.
I can't speak much to Hawaii, but there's a long history to the United States desire to acquire Texas. For a time, a "neutral zone" or "neutral strip" existed in East Texas to serve as a buffer between Spain and the United States. Texas, not being a part of the Louisiana Purchase didn't help either. In addition to that, several Filibusters were attempted to liberate Texas.
I think Texas' rapid annexation was simply the offshoot of the dominant Anglo culture brought to texas by the majority of the American immigrants.