NEW YORK — CC Sabathia had been Xander Bogaerts’ Achilles heel.

Bogaerts, who has faced Sabathia more times than anybody else in his career, entered Sunday’s game against New York just 5 for 34 (.147) with one home run against the Yankees lefty.

Sabathia beat him the first time up with a cutter, high and tight. Bogaerts got jammed and popped up to right field.

In his next at-bat in the fourth inning, Bogaerts again got a similarly-placed cutter on a 2-2 count. This time he fouled it off. The next pitch was a hanging slider and Bogaerts hammered it deep over the left field wall.

“I remember he led off that at-bat with a slider and I remember seeing it good,” Bogaerts said after the Sox’ 8-5 win. “I battled, battled, battled, fouled, and he threw it again. I think it had something to do with the first one I saw. I recognized it good, let my hands stay back. Obviously I wasn’t expecting it to go like that once it left his hand, but I’ll take it.”

Bogaerts already has 12 homers this season and is on pace to shatter his career-high of 23 in a season, set in 2018.

“I think my mindset has changed,” he said. “I remember before, I used to see a big hole up the middle and just want to get a base hit up the middle, run hard, maybe get an infield hit. I don’t think like that no more. I think it’s the mindset I go up to the plate with. I still see that big hole, but it’s not something I want to do. I want to drive it.”

He’s excelled in the cleanup spot, hitting .305 with a .936 OPS. And he’s played in 56 of the team’s 59 games this year.

“I’ll take him over anybody,” David Price said. “Bogey stays even-keeled. Doesn’t matter if he’s going good or going bad, Bogey always shows up to play. Whether or not he’s feeling good physically or he’s ailing, it doesn’t matter. He’s always in that lineup, never gets days off. I don’t think he’s ever had a DH day in his career. Bogey is special.”

Manager Alex Cora partially credited Bogaerts for Rafael Devers’ breakout season.

“He’s not only leading the team on the field but I think in the clubhouse,” Cora said. “He has to do a lot with what’s going on at third base too. Like I told you guys last year, he’s the only guy on this team that knows what it is to be on a championship-caliber team, a World Series team when you’re 20 or 21.”

After the team signed him to a six-year, $120-million extension before the season, Bogaerts said he felt like leadership was a priority.

“I would say so,” he said. “Obviously with the huge commitment that the team made me with me, you kind of feel that way.

“We have a lot of young guys here, and just trying to show them the right way to do things and keep yourself out of trouble. When I came up, we had a lot of veterans that were hard on us and I enjoyed it. It kind of taught you the right way. It’s the same thing we have to do now. Obviously we’re in a new generation, things are much looser, but there always have to be a few lines that you can’t cross and stuff you can’t do.”