AT&T Inc. Chief Executive Officer John Stankey says inflation could prompt the wireless and broadband company to raise prices for some core services while it continues to cut costs after getting out of the media business.

The company on Friday completed the planned separation of its film-and-TV empire into a new publicly traded company called Warner Bros. Discovery. AT&T shareholders will get a 71% stake in the new entity, which will be led by Discovery Inc.’s David Zaslav.

AT&T is returning to its roots as the ground shifts beneath it. Inflation has raised the cost of everything from labor to router parts, putting more pressure on its bottom line. But the average rate that U.S. cellphone carriers charge for wireless service has barely budged. AT&T, meanwhile, has been adding and keeping wireless customers for more than a year, partly by offering aggressive promotions for new smartphones.

AT&T under Chief Executive John Stankey, who spoke at a 2018 event, plans to use most or all of the cash from its media sale to help pay down debt.

Photo: Matt Winkelmeyer/Getty Images

In an interview, Mr. Stankey said the company might have some latitude to raise some prices to reflect the value of its services if inflation continues driving up the cost of other goods and services. “You’ll probably start to see it over the next several quarters, not just telecom—more broadly in the economy because of the patterns that we’re seeing,” he said.

He said a potential economic downturn could make the company’s shares more attractive to investors looking for a business that tends to perform well during such a slowdown. Surveys show that consumers treat cellphone service like a must-have utility and will cut other household expenses before they touch their phone bill.

“We are a very, very safe place to put money right now,” he said.

Investors and analysts have questioned whether AT&T and its peers can continue racking up new cellphone subscriptions at last year’s breakneck pace. Wireless companies have so far lured new clients with deep discounts on new smartphones and by spreading out the cost of the device subsidies over time.

AT&T still faces challenges that include a high debt load, fickle customers and stiff competition, according to Craig Moffett, a researcher for the telecom and media analysis firm MoffettNathanson.

‘We are a very, very safe place to put money right now.’

— AT&T CEO John Stankey

“The only way you can make this business grow is to grow subscribers,” he said. “They’re still in precisely the same pickle they were in back in 2014.”

AT&T said it plans to use most or all of the $39 billion of cash from its media sale to help pay down debt. The slimmed-down telecom company still generates about $120 billion of annual revenue.

Company executives said they would increase investment this year and next year to expand its fifth-generation wireless network before hemming in capital expenditures in 2024. They also want to more quickly add fiber-optic broadband customers in the coming years.

AT&T will also keep cutting costs. Executives in March sketched out a plan to halve AT&T’s network of copper telephone lines by 2025. Crews will replace some of that lost revenue by building new high-speed fiber-optic cables, but the company said it plans to shut down old landlines in areas where fiber upgrades aren’t cost-effective.

Securities filings show the postmedia AT&T employs about 173,000 workers, down from 253,000 in early 2015. Mr. Stankey said corporate overhead had plummeted over the past 18 months and would continue to drop to reflect the new company’s structure.

“It’s a different company now,” he said. “We don’t really need to run a superstructure corporate holding company and will continue to rationalize that.”

The Dallas company plunged into the entertainment sector in 2014 by agreeing to buy the satellite broadcaster DirecTV for about $49 billion. It followed that move with a roughly $85 billion cash-and-stock bid for Time Warner Inc., owner of HBO, CNN and Warner Bros. The media takeover closed in 2018 after the company won a federal antitrust trial.

Mr. Stankey, a company veteran who became AT&T’s CEO in 2020, started almost immediately exploring ways to unwind those media bets. The company spun off a controlling stake in DirecTV’s domestic business to a new venture with the private-equity firm TPG and later sold its Latin American operations. The CEO in May 2021 detailed plans to divest itself of the media wing by merging its studios and TV channels with those of a smaller rival, Discovery.

Company executives have said splitting up the company would give both media and telecom businesses the resources they need to grow. AT&T serves customers across the U.S. and Mexico, but the now-independent media company’s HBO Max streaming service is competing for subscribers world-wide against deep-pocketed rivals such as Amazon.com Inc.

and Walt Disney Co.

“Both these businesses were going to require investment, and they were going to require probably a different shareholder base to tolerate” the amount of time it takes to make them successful businesses, Mr. Stankey said. “We’ve now managed to clean that capital structure up to enable that to happen.”

In the transaction, AT&T investors will receive 0.24 share in the new Warner Bros. Discovery for each share of AT&T they own. The new company will trade under the WBD ticker and isn’t expected to pay a dividend. AT&T, which has one of the most widely held stocks, says it expects to pay an annual dividend of $1.11 per share this year, compared with $2.08 a share in 2021.

Write to Drew FitzGerald at andrew.fitzgerald@wsj.com