October 10, 2020 | 1:24am

Masahiro Tanaka’s seven-year contract has run out and so has DJ LeMahieu’s two-year deal. Giancarlo Stanton is now through three seasons of his Yankees tenure and Gerrit Cole had ended his first.

The Yankees keep importing pieces, keep searching for that next title. But the clock ticks, one season turning to the next. Prime years disappear. Aaron Judge completes his fourth season, Gary Sanchez his fifth. The payrolls swell. Yet, one ringless season morphs into another winter of “what ifs.”

Nathan Eovaldi, Michael Pineda, Sonny Gray and James Paxton are good ideas, and then not. Jacoby Ellsbury is never a good idea. Brian McCann and Didi Gregorius have their term of pinstripe service and then they exit.

Aroldis Chapman comes, goes and returns — a symbol now of great talent, big money and larger frustration.

Twice in a row, a Yankees season has finished out of the hand of the reliever with the largest contract ever. Last year, the Astros’ Jose Altuve walked off Chapman and the Yankees in ALCS Game 6. This year, Mike Brosseau, who had a triple-digit Chapman fastball sail over his head on Sept. 1 as part of the blood feud between these squads, exacted revenge by turning a 100.2 mph Chapman fastball into a homer that broke an eighth-inning tie and the Yankees’ spirit. The Yankees were not going to get to the Astros this year or to the ALCS or honor their reason for being assembled: To win that 28th title, the first since 2009.

“Every year we come to spring training with that stacked team, ready to roll and compete for a World Series title,” Judge said after a 2-1 defeat. “To come up short the last few years is tough.”

Yankees
Aaron Boone and Giancarlo Stanton react in the dugout after the Yankees lost Game 5 of the ALDS to the Rays on Friday.Corey Sipkin

How tough? The Yankees lost to a team they despise, Tampa Bay, which kept them from facing a club they loathe, Houston. The Rays had more pitching, better at-bats and one more homer. So the Rays get the Astros while the Yankees will turn from a short season to another long offseason. Trying to keep LeMahieu and perhaps Tanaka, too. Maybe thinking about whether they have enough lefty hitting and defense and whether they can get the last out of a season with Chapman in the closer role.

Chapman likely will begin next regular season serving a suspension for his Sept. 1 dart over Brosseau’s head. Brosseau homered twice against the Yankees the next day and got his and the Rays’ greatest revenge by winning a 10-pitch at-bat against Chapman and turning around a 100.2 mph fastball — the highest velocity that became a homer this year.

Tampa Bay beat the Yankees in the AL East, in this Division Series and in their extracurriculars. They celebrated on a neutral site without neutrality — blaring on the field “New York, New York” and “Empire State of Mind.” Talk about buzzing one over your opponent’s head.

“The ending is not what we wanted,” Luke Voit said. “It is a crappy feeling, man.”

This five-game set was — sorry to Houston — a clash between the AL’s two best teams. But the Yankees are now becoming experts at being second best. They lost to the best team in the AL in 2017 (Astros), 2018 (Red Sox), 2019 (Astros) and now 2020 (Rays). They have spent billions trying to be the best and, instead, they were beaten by a baseball David — knocked out by a player, Brosseau, who was not even drafted.

Both Aaron Boone and Judge said it would “be sweeter” to win after so much heartache. But all that is promised next year is another year. The clock ticking more. The Yankees are good enough to get here, constantly excellent. But the title drought is now 11 seasons — which is substantially more in Yankees calculations.

“We’ve had a lot of success and some heartbreaking playoff losses and it stings. It stings,” Boone said. “I believe it makes us closer and I hope it makes us hungrier. But it is a hurting room.”

Aaron Hicks
Aaron HicksCorey Sipkin

The Yankees wanted to believe Cole was the missing piece to get them back to a championship podium. And Cole was not the problem. He gave them 5 ¹/₃ one-hit innings pitching on three days’ rest for the first time in his career. The hit was Austin Meadows’ game-tying fifth-inning homer. But long at-bats by the Rays in the first and fourth soared Cole’s pitch count and depleted his energy. Three of the final five batters Cole faced resulted in the Meadows homer, a Kevin Kiermaier warning track fly and Brett Gardner robbing Randy Arozarena of a homer.

That last one ended Cole’s effort and began a relief chain of Zack Britton and Chapman earlier than Boone had hoped. It led to Chapman in the seventh and his downfall in the eighth.

Brosseau’s vengeance pretty much ended the 2020 Yankees because they did not register a hit after the sixth inning and had no hits in eight at-bats with men on base. They were short again. Ringless again. The revolving door spun more in, more out, more payroll, more sorrow. The 2020 season will be another close but …

“It’s awful,” Boone said. “The ending is cruel, it really is.”