Silhouetted against the predawn light of the West Texas sky, a group of oil field workers got ready for the tough job ahead on a September day — cleaning up a spill on a rig outside of Odessa — speaking a mix of English and Spanish.

All 80 employees of their company, Premier Energy Services, are Hispanic, reflecting a shift that has slowly transformed Texas’ oil-rich western expanse. Where a roughneck — the grease-stained symbol of Texas’ economic identity — was once typically a white man hoping to strike black gold, the average oil field worker is now a Hispanic man who was born in Texas.

“Growing up, my dad used to take me to work in the oil fields. It was a white man’s industry,” said a foreman, Alfredo Ramirez, 31, a third-generation Mexican American. “Today it is us Latinos.”

Mark Matta, a city councilman in Odessa, chuckled as he described a television series about a Texas oil rig in which most of the workers were white. “That show flipped our reality,” he said.

Understanding the reality of Texas matters. With a population of over 30 million, Texas is increasingly shaping the cultural and political direction of the country. Its economy is one of the largest in the world, growing faster than the nation’s as a whole.

The state has long been defined by demographic change, particularly its growing Hispanic population. But the nature of those changes, and how profound they have become, has often been misunderstood, even by those who follow the state closely.

The New York Times collected years of census data, analyzed migration patterns and traveled to communities across Texas to understand what is happening in the nation’s second most populous state, a place that offers an important window into the future of both national politics and the attempts to deal with questions of identity and diversity.

What stood out was the degree to which Texas already has become a state of immigrants, a population that is now multigenerational.

The fastest growing demographic group is made up of the children of immigrants, predominantly Texas-born Hispanics. That means that white people, who had long been the state’s largest demographic group, are now outnumbered by those who are Hispanic, even among native-born Texans, a change first documented by the U.S. Census Bureau this year.

A visitor to the state 30 years ago would have encountered two born-and-bred white Texans for every Latino born on Texas soil. Today, those groups are of nearly equal size.

“Few in my family speak Spanish,” said Shawn Rodriquez, whose ancestors came from Mexico to Odessa, where he now owns an oil field services company. “Our ancestry is from right here in Texas.”

Texas has also been a magnet for people moving from other states, a fact celebrated by its Republican leaders, including Gov. Greg Abbott, who boast of luring businesses away from California and New York to their state’s lower taxes, cheaper housing and more conservative politics.

But because Texas is so populous, migration has less of an effect than it does on other fast-growing states, like Nevada and Arizona. And the composition of these domestic migrants is often misconstrued. While white professionals are indeed moving to Austin, the state is gaining two people of color for every white migrant.

Newcomers from other states are reshaping the suburbs in surprising ways. Take Frisco outside of Dallas. The city has seen an influx of white transplants to new developments on tracts of farmland. But a huge number of Asians have also moved in.

In 1990, when around 6,000 people lived in Frisco, the census listed just 29 Asian residents. Now, nearly a quarter of the city’s 220,000 residents are Asian.

Texas also leads the nation in the growth of its Black population, surpassing Georgia and Florida. And unlike Black transplants to other states, who are often either poor or rich, those coming to Texas are more likely to be middle class, census data shows. In Houston, Black-owned businesses have been thriving, with the city now rivaling Atlanta as a destination for Black families and young people.

“Everyone is coming to Houston,” said Victoria Walsh, 30, who moved from New Orleans for a restaurant job in 2018. “There’s a whole lot of jobs, a whole lot of new concepts, a new pop-up each week.”

The trends have already affected the state’s politics, and are likely to continue to do so. In Odessa, where the Latino share of the local population has nearly doubled to 56 percent since 1990, the mayor is still a conservative Republican, but for the first time, he is Hispanic.

Democrats have seen their margins of defeat shrink. This is happening not just in cities, where Democrats often now dominate, but also in various other areas with a large number of Texas-born Hispanics. Still, demographic changes alone will not guarantee victory for the party, as polls have found that a growing number of nonwhite voters may be up for grabs.

Republicans, recognizing the changes, have courted conservative Hispanics and have seen some recent electoral successes, particularly in the Rio Grande Valley.

For many Americans outside the state, Texas’ identity is quickly conjured: Cowboys and football. Guns and oil. Pickup trucks and Waylon Jennings.

In reality, it is a complex mixture: The Dallas suburbs recently hosted a professional cricket league, attracting thousands of screaming fans, and welcomed the return of a refurbished 1950s country music dance hall.

“The identity of being a Texan has changed completely,” said Ray Benson, a long-ago transplant from Pennsylvania whose western swing band, Asleep at the Wheel, played at the dance hall’s reopening. “I came to Texas to become a Texan. But now I think more people moving to Texas just bring whatever their culture was before.”

In reporting trips over miles and miles of Texas, to borrow a phrase from a classic song, The Times found a broad range of Texans, settling in a few representative places — a North Texas suburb, the roughneck hub of Odessa and the heart of Houston — to tell the story of a state in rapid transition.

Heather Eastburn and her husband were living in Los Angeles but after having children, they needed more space and decided to relocate to Frisco, Texas, near where her husband, a Republican wealth manager, was from.

Ms. Eastburn had doubts.

“People would tell me, ‘oh, you’re going to have a good life there. It’s an easy life,’” she recalled. “And I was like, what does that mean?”

After the move, she discovered what they meant. The schools were good. Everything was new, down to the shopping carts at the grocery store. “It was like I was pushing a Cadillac around in the Kroger instead of fighting with something like you would in L.A.,” she said.

Frisco, a suburban boomtown that barely existed 30 years ago, has become a landing pad for transplants from around the country, drawn by relatively cheap housing and jobs in and around Dallas and Fort Worth.

White transplants make up a large share of new arrivals, but the Asian population has been growing even faster, making what might otherwise have been a predominantly white suburb much more diverse.

Julia Wada, a former Toyota executive who is Japanese American, moved with her family when the company relocated to the area. “I’ve been more connected with the Asian community here than I was in California,” she said, in part because the community in the area was still growing and developing.

Indian restaurants and Asian shopping centers have sprung up everywhere. Many of the new houses are being designed to appeal to the growing South Asian population, with developers orienting them around the concept of Vastu Shastra, an ancient Indian design philosophy.

“They were not people who were Indian or familiar with the concept,” said Sunitha Cheruvu, a native of India who moved to Frisco more than a decade ago. “But they learned from the influx of people.”

Public schools have about 40 percent Asian students, up from 13 percent a decade ago.

The city now marks the Hindu festivals of Holi and Diwali, along with Lunar New Year, Christmas, Hanukkah and Ramadan, said the mayor, Jeff Cheney, a real estate developer and moderate Republican.

The politics of the city are decidedly mixed, including progressive Democrats and hard-line conservatives. Several Frisco residents were among those who stormed the U.S. Capitol on Jan. 6, but in recent school board elections, voters rejected candidates backed by a Christian conservative cellphone company, Patriot Mobile, that has been trying to shift the direction of the schools.

“There’s an uneasy tension that exists, and you feel the tension — it’s under people’s breath,” said Shawn Amos, a writer and musician who is Black and moved to Frisco six years ago.

No doubt, some of the newcomers were drawn to Texas precisely because of its conservative politics. Allyson Menier, a court reporter, and her husband, a former Los Angeles police officer, moved in 2021 from California to escape what she said was an anti-police environment fostered by Democrats.

“The hostility is not here, like it was in California,” she said. “We left everything and moved here with no friends, no family. And it was so worth it.”

It was not just oil that made Odessa a familiar name to people outside Texas: It is also home of the high school football team immortalized in “Friday Night Lights.”

But a new generation of Texans can be found on any given afternoon in a gym near downtown, shadow boxing under an oversized Mexican flag.

The rise of boxing, a popular sport in Mexico, is a sign of the changing city. Ariel Lares and Jonathan Armendariz, both 13, who were sparring one recent afternoon, said a lot of young people play football, but boxing brought them closer to their parents, who often watch Mexican bouts on television.

“We are all American,” said Iram Sanchez, the owner of the gym, Gorilla Heavy Hitters. “The flag is a reminder of our culture.”

As the number of Hispanic residents born in Texas outstrips the number of white people born in the state, there has been a notable change in the work force.

The Times identified more than 100 occupations with a significant shift away from Texas-born white workers and toward Hispanic employees, including office work, sales jobs and health care support.

Latino Texans are now a significant presence in a field that has, for generations, defined the Texas economy: energy extraction.

The oil-rich Permian Basin, where Odessa sits, has seen the biggest transformation. The Texas-born Hispanic population has doubled since 1990, while the Texas-born white population has declined by nearly a quarter.

A generation ago, about half of the state’s oil field workers were born in Texas and white. Today, fewer than three out of 10 could be described that way.

The growing presence of Hispanic workers in the oil industry helps explain the Republican Party’s continuing influence in places like Odessa, where voters elected Javier Joven, the city’s first Hispanic mayor. The party, he said, “preached sweat equity. That spoke to me.”

Mr. Matta, the City Council member, is also a conservative and said that the Democratic hope of riding a demographic wave to capture Texas has run up against economic realities. “Republicans favor more legislation that’s favorable to drilling,” he said. “You’re not going to bite the hand that feeds you.”

Yet it may be too early to draw conclusions.

Because the population of native-born Hispanics is so much younger than the white population, its impact on Texas politics is only just beginning. Each year, the electorate will grow more from Hispanic Texans reaching voting age than from white Texans reaching that milestone.

In the 2022 governor’s race, Mr. Abbott handily defeated his Democratic opponent, Beto O’Rourke. But an analysis of election and census data shows that, in areas where the population of Texas-born Hispanics was higher, Mr. Abbott’s vote share was lower. And those areas are rapidly taking over the state.

In the 2010s, Texas became the state with the highest Black population growth. Most of that growth has occurred in major cities, particularly Fort Worth and Houston.

The city of Houston has long had thriving Black communities, but in recent years, the new arrivals have driven a kind of renaissance that is fueled, in large part, by who they are: middle-class Black people from other states with good jobs and business ideas.

“I thought maybe I would just stay for a year and then move back to the Washington, D.C., area,” said Cherese Sullivan, a veterinarian who moved from Maryland in 2011. “But I found a lot of opportunities,” she said. “I was able to get connected with a young Black professional scene.”

She met another Black veterinarian and eventually they opened their own animal hospital on Almeda Road, a strip near downtown that has become a hub of Black-owned businesses: restaurants and bars, barbers and food trucks, a radio station and a medical clinic.

“That particular stretch of road is known as Houston’s Black Wall Street,” said Ms. Sullivan, who is raising twins with her husband in the city.

New arrivals have altered the makeup of neighborhoods. Ms. Walsh, who moved from New Orleans, found an apartment in the city’s Galleria neighborhood. “I told myself, if things don’t work out, I’m going to stay in Houston,” she said.

Her initial restaurant position did not go as planned, but she got another job as a flight attendant. And she’s picking up waitressing work on the side. “It was just a whole lot of opportunity,” she said of the city. “There’s something about Houston that they’re about their business.”

Census data shows a distinct pattern when it comes to Black migration into Texas. Among higher-income migrants, Texas, Georgia and Maryland are all destinations. But for more middle-income migrants, Texas stands above all others.

“It’s just like Houston is being talked about in the same breath as Atlanta, or more,” said KeAndré Jordan, who moved to the city for an oil industry job and now has his own marketing business.

Jeremy Craft was able to quit his job as a civil engineer and start a business collecting and sharing information about the city’s Black-owned businesses for those interested in patronizing them.

Talking over a lunch of stuffed turkey legs at the Turkey Leg Hut, an Almeda Road staple, Mr. Craft said that within a few months of starting his business in 2019, he had collected about 300 listings. Now, he is up to 1,300.

“When you look at other cities, they’re not as diverse as Houston,” he said. “They don’t have as many opportunities.”