U.S. government-bond yields held steady Wednesday afternoon immediately after the Federal Reserve met widespread expectations by raising interest rates by 0.75 percentage point at its July meeting.

The central bank’s decision marks the latest step in its fight against inflation, which at 9.1% last month reached its fastest pace in more than 40 years. The rate increase is this year’s fourth, following a same-size hike in June that was the Fed’s most aggressive rate move since the 1990s.

After the Fed’s decision, which most investors considered a foregone conclusion, the yield on the benchmark 10-year Treasury note fell slightly to 2.768%, from 2.786% on Tuesday, according to Tradeweb. The two-year yield, which is more responsive to short-term Fed policy, climbed to 3.061% from 3.041% from a day earlier. Those changes had mostly been built into bond prices by Wednesday morning. Bond yields rise as bond prices fall.

Yields on ultrasafe Treasury bonds largely reflect how investors expect the Fed to set short-term interest rates over the bond’s life. Through the first half of 2022, yields surged as inflation data worsened and projections rapidly built for how quickly the Fed would raise rates.

Yields, in turn, tend to set a floor on borrowing costs throughout the economy. This year, rising yields have boosted the interest rates on new mortgages and have made borrowing more expensive for businesses.

Since mid-June, however, Treasurys have rallied, sending yields lower, as investors see more evidence that Fed rate increases could slow the economy toward a recession. Unemployment remains low, but some big companies have said they would slow hiring, and recent corporate reports have underscored worries that consumers are feeling pinched.

Wednesday’s trading deepened a pattern known as a yield-curve inversion—when short-term yields are higher than long-term yields—which many investors take as a worrying economic sign. Lower long-term rates signal that traders think the Fed will eventually need to pivot to interest-rate cuts as economic output slows or contracts.

Paradoxically, the recent fall in the 10-year yield—effectively a bet that the Fed is succeeding at its job of cooling the economy—can give the central bank more work to do to accomplish its goal, said Mike Sewell, a portfolio manager for government-bond funds at T. Rowe Price.

“In order for the Fed to tackle inflation, they need financial conditions to tighten,” Mr. Sewell said. “If the market is going to loosen financial conditions, that’s only going to force the Fed to go harder.”

Traders will be analyzing what Mr. Powell says in his afternoon press conference for signs of where the central bank will take interest rates at subsequent meetings this year.

in his afternoon press conference for signs of where the central bank will take interest rates at subsequent meetings this year.

Remarks that emphasize the need to control inflation at all costs would suggest Fed officials see additional aggressive rate increases on the way, analysts said. On the other hand, an acknowledgment of recession concerns could pull down market forecasts for where rates will finish 2022.

Write to Matt Grossman at matt.grossman@wsj.com