Joey Gallo of the Yankees strikes out looking to end the second...

Joey Gallo of the Yankees strikes out looking to end the second inning against the Royals at Yankee Stadium on July 28, 2022. Credit: Jim McIsaac

The Yankees acquired a bat before the trade deadline, a big, lefty hitter in his prime, with two 40-homer seasons, two Gold Gloves and two All-Star selections behind him.

This was July 29, 2021. But Joey Gallo just couldn’t find his way in the Bronx after he arrived from Texas. The Yankees finally gave up on the 28-year-old outfielder Tuesday before the 6 p.m. deadline for deals.

They traded the struggling Gallo to the Dodgers in exchange for Double-A righty starter Clayton Beeter, Los Angeles’ 15th-ranked prospect. But that wasn’t the Yankees’ surprising move of the day.

They also dealt a rotation mainstay for another outfield bat/glove. The Yankees sent Jordan Montgomery to St. Louis in exchange for injured Gold Glove centerfielder Harrison Bader and a player to be named later or cash considerations.

So here was the final score: The AL’s best team to date acquired five major-league reinforcements before this deadline — starter Frankie Montas, relievers Scott Effross and Lou Trivino, leftfielder Andrew Benintendi and Bader, whom the Yankees hope will be ready to go sometime in September.

GM Brian Cashman traded away nine players for them in the last week, including eight minor-leaguers, none named Anthony Volpe, Jasson Dominguez, Oswald Peraza or Austin Wells, their top four prospects in the pipeline, according to MLB Pipeline.

“We feel with the current group we have and the additions, we’ve done the best job that we could,” Cashman said.

Bader, who’s from Bronxville in Westchester County, earned his Gold Glove last season. He’s a 28-year-old righty hitter who went on the IL with plantar fasciitis in his right foot June 27. He’s batting .256 with five homers, 21 RBIs and 15 steals. He was a career .246 hitter in six seasons with the Cardinals.

“St. Louis obviously needed starting pitching and Harrison Bader is one of the elite centerfield defenders in the game,” Cashman said. “And so he provides a lot of lanes for our manager when he’s healthy.”

Montgomery was drafted by the Yankees in 2014 and made the rotation three years later. The 29-year-old lefty was just 3-3, but had a 3.69 ERA over 21 starts.

“Yeah, pretty shocked,” Montgomery said, sounding and looking very sad. “Still setting in. It’s my family. It’s all I know. I’ve been playing with some of these guys for years. … It’s just kind of tough.”

So with Luis Severino out until around mid-September, Domingo German will remain in the rotation.

“I like our pitching, clearly,” Cashman said.

He called Montas, who won’t join the team until the weekend in St. Louis because of the passing of his mother-in-law, “a big impact.”

Trivino, who came with Montas from Oakland, posted a 6.47 ERA and had 10 saves as the A’s closer. But the sidearming righty Effross posted a 2.66 ERA in 47 outings for the Cubs. Both were activated for this game.

“It’s exciting, obviously an incredible club to join,” Effross said. “… You think baseball, you think the Yankees.”

Redecorating the bullpen was a priority after the season-ending losses of Michael King and Chad Green.

“I think we have a lot of really good options down there,” manager Aaron Boone said.

Gallo turned out not to be good option. He batted .160 for them last season and .159 this season.

“I think clearly this place had an adverse effect on Joey,” Boone said. “… I think a lot of us, myself included, very much hope that he goes and kind of recaptures what we all know he’s capable of doing.”

More Yankees headlines