ST. LOUIS — For the first time all season — and that’s the surprising part — the Yankees are in a bona-fide rut.

After being shut out, 1-0, by the Cardinals on Saturday night in front of a record crowd at Busch Stadium, the Yankees are dealing with two interlocking problems. Two of their most powerful hitters haven’t been playing due to injury, two other everyday hitters are in miserable slumps and the upshot is an offense that has gone from invincible to docile rather abruptly.

With Giancarlo Stanton still on the injured list with Achilles tendinitis and Anthony Rizzo missing the past two games due to lower-back stiffness, Aaron Judge has stood out even more than a 6-foot-7 near-MVP lock normally would. The depth of the Yankees’ lineup has been largely depleted due to those injuries, along with slumps by Aaron Hicks (a long one) and Gleyber Torres (a medium-sized one), making Judge’s at-bats the only real potential power source this team can rely on at the moment.

When Judge just missed a fastball from Giovanny Gallegos in the ninth inning and flied out to center, it summed up the state of the Yankees’ offense at its season nadir.

Manager Aaron Boone summed it up as: “Good pitching, a couple of guys not totally locked in right now.”

The result has been just three runs in the first two games in St. Louis and the team’s first four-game losing streak of the year. After seeing its homerless streak snap at 19 games on Friday night, the Yankees managed just two hits Saturday against ex-teammate Jordan Montgomery and the Cardinals’ bullpen.

“We’re not excited about it, definitely,” Judge said. “But we’ve still got a great ballclub. We can’t hang our heads and be moping around here that we lost two series. It’s over with. The most important one is this next one we’ve got coming up, so we’ve got to stick to our approach, come out swinging like we do and that’s all we can do.”

Torres has three hits and 14 strikeouts in his last 27 at-bats. Hicks hasn’t hit much all season, but he is particularly cold of late, with no hits in his last 18 at-bats.

While the Yankees haven’t looked menacing in St. Louis, Saturday’s game was particularly excruciating for the team and its fans because a pitcher they just traded away, Montgomery, showed them what they were losing.

Montgomery dealt with some jitters at first, pitching to players who, less than a week earlier, he thought he was going to be competing alongside for a World Series. But after that, he settled into the kind of groove the Yankees had seen from him, mixing his pitches and keeping hitters off balance while allowing just two hits over five scoreless innings.

Like the Yankees did at times, the Cardinals didn’t allow Montgomery to face New York’s lineup three times through the order. Though Montgomery had thrown just 83 pitches, St. Louis manager Oliver Marmol pulled him heading into the sixth inning.

The Cardinals later announced Montgomery had been removed due to cramping, not surprising given the humid conditions, but it seems like the formula for handling Montgomery even when he’s perfectly fine. Of his 483 times facing opposing hitters this season, only 95 of them have come after going through the order twice. Here’s a clue as to why that may be: Five of the 15 home runs he has allowed came in those 95 at-bats that came in the third or fourth time through the order.

Nolan Arenado proved a problem for the Yankees at times on Saturday. The Cardinals’ Gold Glove third baseman robbed Josh Donaldson of extra bases in the fourth inning when he made a diving stop of a hard shot down the line and threw him out off his right knee.

Arenado also drove up Domingo Germán’s pitch total with a 10-pitch at-bat in the first inning, ending it with an RBI single to drive in Paul Goldschmidt.

Like Montgomery, Germán is a relatively soft tosser who often struggles late in games, so the Yankees let him go only five innings, though he allowed just four hits. Germán settled in for the middle innings after throwing 31 pitches in the first.

Goldschmidt nearly hurt the Yankees again and made it 2-0 when he muscled up for his second double in two at-bats in the third inning, but Tim Locastro and made a good throw to Torres, who threw out Nolan Gorman on a close play at the plate.