Devin Williams of th Yankees reacts after surrendering a seventh-inning two-run base...

Devin Williams of th Yankees reacts after surrendering a seventh-inning two-run base hit against the Toronto Blue Jays in Game 4 of the American League Division Series at Yankee Stadium on Wednesday. Credit: Jim McIsaac

Some players have a hard time adjusting to playing in New York.

Few of them admit it.

After the Yankees’ season-ending 5-2 loss to the Blue Jays in Game 4 of the ALDS on Wednesday night, Devin Williams admitted it.

“At first it was a challenge, but I’ve grown to love being here,” he said. “I love this city. I love taking the train to the field every day. Yeah, I really enjoyed my experience here.”

The Yankees acquired Williams from Milwaukee to be their closer. He lost the job twice but rebounded and was solid in the final stretch and the postseason as David Bednar’s setup man, although he did give up a two-run single that allowed a pair of inherited runners to score in the seventh inning of Game 4 as Toronto increased its lead from 2-1 to 4-1.

Williams had a career-worst 4.79 regular-season ERA and converted 18 of 22 save chances. Last year, his ERA with the Brewers was 1.25, which of course doesn’t include the huge three-run home run he gave up to Pete Alonso in the Mets’ stunning clinching victory in Game 3 of the NL Wild Card Series.

The Brewers didn’t trade Williams because of that home run; he had a career 1.83 ERA and 68 saves in six seasons with Milwaukee. The Brewers traded him because he was getting too expensive for them with an $8.6 million salary for 2025 and was going to be a free agent after the season.

Williams’ tricky transition to New York actually started in Tampa when spring training opened. Williams made it clear he wasn’t thrilled with the Yankees’ longstanding facial hair policy, which the team changed on Feb. 21 to allow beards for the first time since the 1970s.

Williams was booed on Opening Day as he shakily closed out the Yankees’ 4-2 victory over his old Milwaukee team.

As Taylor Swift sings, “Welcome to New York.”

“It’s just an adjustment,” Williams said early Thursday morning to a group of reporters in the almost empty Yankees clubhouse. “I played in the smallest market in the league [and went] to the biggest market in the league. I drove to the field every day . . . It took me 10 minutes to get there in Milwaukee. There’s just a lot of life stuff.

“It’s an adjustment. Having never played here, I got here a day before the season started and then had to, like, figure out my routine, kind of on the fly, and just things like that. Like just this right here, the number of [reporters] that want to talk to you, it was different. But I feel like I adjusted pretty well.”

Asked if he would like to return to the Yankees, Williams said: “I’m definitely open to that. Takes two parties for that, but, yeah, I would definitely be open to it.”

With Bednar under Yankees control for next season, it’s unlikely the team also would want to pay closer money to Williams, who acknowledged that the desire to own the ninth inning again could be a factor in where he signs for 2026.

In his next-to-last appearance, Williams threw 1 1⁄3 scoreless innings in the Yankees’ lone win in the ALDS in Game 3. He received a standing ovation as he returned to the dugout.

“It’s nice to feel appreciated sometimes,” he said. “Yeah, it was definitely a lot better than what I’ve heard for much of the year.”

Devin Williams isn’t the first MLB player to have trouble adjusting to playing in New York. Some have overcome it, while some did not.

Mike Piazza, 1998

After coming over to the Mets in a trade with Miami in 1998, Piazza struggled and was booed at Shea Stadium. But in October he re-signed for a then-record seven years and $91 million.

“I definitely had some growing pains coming here," Piazza said. "Once I went through the ups and downs of New York, I definitely wanted to finish my career here."

Piazza actually finished his career in Oakland in 2007. But he went into the Hall of Fame with a Mets logo on his plaque.

Francisco Lindor, 2021

After getting traded to the Mets from Cleveland and signing a 10-year, $341-million extension, Lindor hit .230 in his first season in Flushing, and along with Javy Baez gave Mets fans a “thumb-down” signal because of booing during an August game.

“I’ve had ups and downs here and I’ve learned from everyone in this city, in this room, in that clubhouse over there,” said Lindor, who is now the de facto Mets captain. “I’ve definitely grown.”

Joey Gallo, 2021-’22

The Yankees acquired Gallo from Texas in 2021 and dumped him on the Dodgers in 2022 after he hit .159 in 140 games.

“There’s nothing the Yankees were doing wrong,” Gallo said. “I just didn’t play well there. I wish I played better.”

Sonny Gray, 2017-’18

Gray was an All-Star starter before the Yankees acquired him from Oakland at the 2017 trade deadline, but he seemed spooked by New York and was traded away after the 2018 season to the Reds, where he resumed his All-Star form.

“I think everyone kind of knows that New York wasn’t a great fit for me, place for me,” Gray said. “It just didn’t seem to work out for whatever reason.”

Ed Whitson, 1985-’86

A dependable starter for a San Diego team that went to the World Series in 1984, Whitson signed a five-year, $4.25-million contract with the Yankees and started out 1-6 with a 6.23 ERA. He also got into a fight in a hotel bar in Baltimore with manager Billy Martin in September.

In 1986, under manager Lou Piniella, the Yankees tried pitching Whitson only on the road for a time.

“It’s like working in an office and your boss comes in and says, ‘You suck,’ after you’ve tried your best,” Whitson said. “Now multiply that by 50,000 bosses, all of them telling you that you suck, and imagine what that feels like.”

The Yankees traded Whitson back to San Diego in July, and he went back to being a dependable starter.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME