Yankees' Giancarlo Stanton (27) celebrates with Aaron Judge after hitting...

Yankees' Giancarlo Stanton (27) celebrates with Aaron Judge after hitting a two-run home run during the first inning of a baseball game against the Chicago White Sox in Chicago, Friday, May 13, 2022. Credit: AP/Nam Y. Huh

CHICAGO — Gerrit Cole wasn’t at his best. Neither was the Yankees’ defense.

It mattered not in the least.

Giancarlo Stanton, Aaron Judge and Joey Gallo hit two-out homers and Josh Donaldson added a late blast in the Yankees’ 10-4 win over the White Sox on Friday night.

“What’s really making us go right now is, one through nine, we’re really doing a good job of putting at-bats together,” Donaldson said. “And when you can do that, it takes pressure off of everybody else.”

The Yankees, who have won five straight, 17 of 19 and 19 of 22, maintained MLB’s best record at 24-8. That’s their best start after 32 games since the famed 1998 club burst from the gate 25-7. “Just really good at-bats throughout the night,” Aaron Boone said.

Stanton hit a two-run homer (his 10th overall and fifth in his last five games) in the first and Judge hit his MLB-leading 12th homer — and his 11th in his last 18 games — on an 0-and-2 pitch in the fourth. Including the postseason, the Yankees are 21-1 when both homer in the same game.

Gallo contributed a solo shot in the fifth and Donaldson (three RBIs) hit a two-run blast in the ninth. “Our pitching staff’s been carrying us early on in the year,” Judge said. “We’re just trying to pick up the slack a little bit.”

Cole, 2-0 with a 0.47 ERA in his previous three starts, battled command issues at times and some shoddy defense behind him. The righthander allowed three runs, six hits (including a two-run homer by Gavin Sheets in the sixth) and a walk in 6 1⁄3 innings, striking out nine. He also balked in a run and threw a wild pitch.

Cole (3-0, 2.95) was given a big lead early.

Judge worked a one-out walk off Vince Velasquez (2-3, 5.53) in the first, and one out later, Stanton drove Velasquez’s slider over the centerfield wall for a 2-0 lead. Stanton has 22 RBIs in his last 15 games, a stretch in which he’s homered eight times. “He’s a guy that can take over a game, take over a series,” Judge said.

Tim Anderson led off the bottom of the first by lining a 96-mph fastball to right. A gliding Judge caught up with the ball on the track but saw the ball bounce out of the webbing of his glove for a double. After falling behind Yoan Moncada 3-and-0, Cole struck him out swinging at a 99-mph fastball.

Jose Abreu worked a walk, but Cole seemed as if he’d gotten out of the inning when Luis Robert hit a routine grounder to short that looked like a surefire inning-ending 6-4-3 double play. However, Kiner-Falefa booted the ball for an error, loading the bases for Sheets.

Cole struck him out swinging at a 100-mph fastball and some brief fireworks ensued, though fireworks probably is a stretch.

Jose Trevino made a snap throw to third to try for Anderson after the strikeout and the runner took issue with Donaldson’s aggressive tag, which moved him off the bag. The benches emptied — rather unenthusiastically. After a couple of minutes of some staring and light grabbing, play continued and Cole struck out AJ Pollock swinging at a slider to end the 28-pitch inning.

Before the strikeout, Anderson and Donaldson appeared to share a few far less heated words. “I was like, ‘Hey, man, if I pushed you, my bad,’ ” Donaldson said. “I wasn’t trying to do that if that’s what happened. I was just trying to get the out.”

After the strikeout of Pollock, Cole appeared to point at Kiner-Falefa as if to say, “No problem” on the error.

“It goes back and forth at some point,” Cole said. “Somebody’s going to have to make a diving play to get us out of a jam . . . This time I was given the opportunity to get us out of the jam. It was fun.”

More Yankees headlines

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME