Boston shortstop Xander Bogaerts understood what it meant to be involved in a Yankees-Red Sox environment long before the first time he took the field in one.

Growing up in Aruba, Bogaerts aspired to be like former Yankees great Derek Jeter. Bogaerts saw Jeter playing in All-Star Games, making acrobatic plays in the field and coming through in clutch situations at the plate — many times at Boston’s expense. He mimicked the 20-year Yankee to the point of donning his No. 2.

The similarities go beyond the number. Each shortstop won a World Series in his rookie season and recorded more than 125 hits in his first full season in the majors and more than 190 in his second. Bogaerts — in his third full season — has started 87 of 89 games and is on pace for 217 hits this season. Jeter had 203 in his third year.

But Bogaerts isn’t ready for comparisons. He still finds it a little strange that he’s been the only No. 2 at baseball’s most prominent infield position during Yankees-Red Sox games at Yankee Stadium the past two seasons. He does believe the Yankees have found a good replacement in Didi Gregorius, though.

“Playing here is hard, especially Red Sox vs. Yankees. It’s been a rivalry,” Bogaerts said. “Obviously, you know when the captain’s out there and you look out there normally where he used to play, but now they have a good shortstop over there. Didi’s doing a great job.”

And if there’s anyone in baseball right now who knows about doing a good job at shortstop, it’s Bogaerts. Don’t let his age fool you. The 23-year-old entered the All-Star break tied for second in baseball in hits (117) and sixth in batting average (.329). The All-Star starter ranked fifth in on-base percentage (.388) and multihit games (34) and sixth in runs (65) in the American League.

advertisement | advertise on newsday

One of his goals was to be the Midsummer Classic’s starting shortstop, something Jeter accomplished nine times in his career. “It’s what you work for,” Bogaerts said. “In the offseason, you put in a lot of work and to see the results now and the way people appreciate what you do.”

He wasted little time after the break building on his strong first half. In his third at-bat Friday night against the Yankees, Bogaerts turned on a 96-mph fastball from Michael Pineda and drilled it into the leftfield stands for a two-run home run.

In a time when young, talented hitters can be found throughout the game, Bogaerts is holding his own with players such as Mike Trout, Bryce Harper and Kris Bryant — all 24 or younger.

Bogaerts started his first game at shortstop in 2013 before the age of 21, and after turning 21 in October of that year, he became the youngest player in Red Sox history to start in the postseason. Bogaerts started the final eight playoff games in Boston’s 2013 championship season — his first coming at 21 years, 16 days old — and hit .296.

“We’re seeing a guy really come into a zone,” Red Sox manager John Farrell said. “Last year, start to finish, hit for a high average. He continues to feel comfortable, confident, power is starting to show up a little more this year . . . I think we’re all confident there will be more of that to come.”

Yankees videos

And maybe the key to that confidence is youthful enjoyment. After Bogaerts’ home run Friday night, he smiled while rounding the bases. Bogaerts met Dustin Pedroia at home with a fiery elbow/forearm bump celebration before doing the same with David Ortiz on deck.

From his high red socks on the diamond to an occasional windup leg kick when throwing the ball around the infield, Bogaerts is focused on the fun of the moment — something his teammates appreciate.

“I think he’s how he is on the field. He’s not different,” said outfielder Jackie Bradley Jr., who played in his first All-Star Game on Tuesday. “He’s not trying to show you something that he’s not and he’s just a kid out there having fun, enjoying the game.”

Fellow All-Star Mookie Betts said Bogaerts is always “laughing and joking. Definitely smiling a lot. Just enjoying life. I think it kind of rubs off on everybody.”

The three Red Sox All-Stars age 26 or younger have pushed each other all season. Bogaerts and Bradley have had hitting streaks of more than 25 games this season and Betts is in the midst of a 13-game hitting streak. Mix in veteran hitters Ortiz and Pedroia and it’s no surprise that Boston led baseball in runs, batting average, on-base percentage and slugging percentage entering the All-Star break. It’s been the key to a team that entered Saturday two games out of first place in the AL East.

advertisement | advertise on newsday

“I think it adds a little bit of energy,” Bradley said. “We have guys who are younger but we also have the veteran guys that have been there before and are able to keep us focused. Keeps us hungry and we’re having fun.”