The Rangers' Wyatt Langford, right, beats a tag by the Yankees'...

The Rangers' Wyatt Langford, right, beats a tag by the Yankees' Jazz Chisholm Jr., front left, at third base during the sixth inning in the second game of a doubleheader, Saturday at Yankee Stadium. Credit: AP/Noah K. Murray

In Game 1, Carlos Rodon continued the roll he’s been on.

In Game 2, Gerrit Cole was rolling big time before being pulled at 90 pitches.

It backfired.

And so, after Rodon threw 5 2⁄3 mostly dominant innings in the Yankees’ 8-0 victory over the Rangers in Game 1 of Saturday’s doubleheader at the Stadium, a sixth-inning implosion by Luke Weaver helped sink them in a 9-4 loss in Game 2.

With the score tied at 1-1 in Game 2, Cole — having allowed one run and struck out a season-high 10 — was yanked with none on and one out in the sixth.

Aaron Boone was accompanied by a smattering of boos as he went to get Cole — who started the season on the injured list with elbow inflammation and was making only his ninth start — and heard a torrent of them when he went to get Weaver after the inning unraveled.

Weaver, who entered the day with a 2.81 ERA in 44 games and was ninth among AL relievers in WHIP (0.88) and opponents’ on-base percentage (.241), allowed a single by the first batter he faced, Nathaniel Lowe. Adolis Garcia singled and so did Leody Tavares, which turned into the key play of the game.

The latter’s hit was a sinking liner on which rightfielder Juan Soto made a diving attempt to his right, but the ball popped out of his glove as he hit the ground. Throwing while still on the ground, Soto got the ball in quickly to Gleyber Torres, whose heads-up throw to third beat Lowe. Jazz Chisholm Jr., however, straddled the bag rather than keeping contact with it, which would have resulted in an easy forceout, and made a late tag that should have been unnecessary. He got the out call, but the Rangers were successful in their challenge — Chisholm’s left foot was slightly off the base — and the bases were loaded.

Chisholm said he thought Soto had been credited with a catch and that Lowe was tagging up.

If the Yankees had recorded that second out, they conceivably could have gotten out of the inning with no runs scoring. Instead, they allowed five.

Weaver walked No. 9 hitter Carson Kelly on four pitches to force in a run and Josh Smith’s sacrifice fly on a bullet to right made it 3-1. Corey Seager then jumped on a first-pitch fastball for his 25th homer and a 6-1 lead.

“That was devastating for sure,’’ Weaver said of his outing. “I think the biggest thing is the four-pitch walk. To Seager, I felt like I got the ball up and in, but just a really good hitter. Just one you write up and wish it went different, but this game just finds a way to humble you sometimes. And Gerrit did such a great job, so it hurts. You feel a little shellshocked from it, but you keep pushing forward knowing there’s another game tomorrow.”

Said Cole: “Luke has been so good for us this year, I mean, elite. We all have our off days. He’s a big part of our team and he’s helped us out a lot. It’s a situation that normally he comes in and locks down. He just didn’t have a good day today.”

The decision to remove Cole was defensible. He still is in the early stages of his regular season, and the goal is to have him going on all cylinders for a stretch run that the Yankees hope will take them into October.

Said Boone: “[We were] pretty strict to 90 today, with what he’s been through [starting the season on the IL and being skipped two starts ago because of general body fatigue] . . . We know how important he is to our staff and our rotation, so want to be smart with it. I think we’ll be in a good position to build from there and pick our spots where we back off a little bit. Today I thought was really encouraging. I thought he had a little bit of everything going.”

Offensively, the Yankees (69-49) were polar opposites in the two games. They outhit the Rangers 12-5 in the first game but were outhit 16-8 in the second. They did receive back-to-back homers by Giancarlo Stanton (No. 19, a 451-foot two-run shot to center) and Chisholm (No. 20) in the eighth in Game 2.

Stanton’s homer was his first since June 19 because of time spent on the injured list. Chisholm, who also homered in Game 1, has hit seven homers since joining the Yankees in late July. He became the first player in franchise history to hit at least seven homers in his first 12 games, according to the team.

Game 1 produced far more highlights for the doubleheader crowd of 41,996, the vast majority of whom had scattered by the middle innings of Game 2.

Rodon (13-7, 4.18), backed by a four-RBI afternoon from Austin Wells, allowed three hits in 5 2⁄3 innings in improving to 4-0 with a 2.22 ERA in his last four starts. He allowed five walks but struck out six while throwing a season-high 110 pitches.

“He’s been really good at hitting his spots and he’s mixing his pitches,” Wells said of the difference of late for Rodon. “For him, I feel like there’s one or two big at-bats every outing that can make or break the start, and he’s doing a really good job of controlling the situations.”

“The goal was to be in the zone,” said Rodon, who departed the mound with one on and two outs in the sixth to a loud ovation, which he acknowledged with a wave as he neared the dugout steps. “Five walks is never great, but I’ll take the five zeros and I’ll take the win.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME