It is no wonder the Giants at present look at if they possess a rag-tag defense. Rummaging through the bargain bin goes only so far.

You get … what you pay for.

The way it works in the offseason, the 51 players on the roster with the largest salary-cap numbers count against the cap. In that group, the Giants have 23 players under contract on defense, accounting for just $24.3 million on a salary cap that is expected to rise to more than $200 million for the first time. Take away veteran safety Antoine Bethea, who likely will not be on the team this season, and the on-the-books expenditure on defense is less than $22 million.

Contrast this with the full-retail priced offense — where two linemen, Nate Solder and Kevin Zeitler, account for $32 million on the 2020 cap and the top seven players on offense eat up $68.7 million. You like Daniel Jones handing off to Saquon Barkley or throwing it to Sterling Shepard, Golden Tate or Evan Engram? Well, those five players sharing the football cost more than $36 million against this year’s cap.

The highest-priced defensive player? Dexter Lawrence, entering his second season, costing a mere $3 million on the cap. Another second-year player, DeAndre Baker, is at a cap cost of $2.39 million — followed by Jabrill Peppers ($1.87 million), Dalvin Tomlinson ($1.45 million), and Lorenzo Carter, Sam Beal and B.J. Hill (all $1.1 million).

This is going to change. The Giants will sign someone in free agency who costs more than $3 million on this year’s cap. They are likely to take someone in the draft who will surpass Lawrence as well. The Giants know they cannot build a defense around mercenaries — they tried that approach in 2016 and it worked for only one year — and are fully cognizant the only healthy way to grow is from within with homegrown talent.

Joe Schobert; Dave Gettleman; Jamie Collins NFL rumors draft free agency 2020 Giants
Joe Schobert; Dave Gettleman; Jamie CollinsAP, Charles Wenzelberg, Getty

The Giants will be active when the legal tampering period for free agency kicks off March 16, especially since they should come in at around $74 million under the cap, giving them the sixth-most money in the league to spend. But taking a ride in free agency is a fast-track to overpaying, no matter how cognizant of this a team is heading into the market.

“It’s part of the problem we have as we build this thing is we don’t have veterans in the building that are New York Football Giants,’’ general manager Dave Gettleman said. “That’s part of the problem. If we’re going to do something like that, we’ve got to be extremely selective and bring in the right people.’’

For a team coming off a 4-12 season, after coming off a 5-11 season, after coming off a 3-13 season, there are few wrong answers to the question “What needs immediate attention?’’ Offensive tackle is an ongoing challenge, but the makings are there for a quality offense — based on the firepower available and anticipated improvement of Jones coming off a promising rookie year. There is not the makings of much on defense, though.

A case can be made for help everywhere on defense, other than the interior of the line, with Lawrence and Dalvin Tomlinson returning to a position Leonard Williams will make even stronger if he re-signs. Linebacker is a forever dilemma, and the secondary has Peppers at strong safety and a bunch of kids at cornerback.

The draft can wait. Gettleman wants to shore up as many holes as possible in free agency, and he must bring in a few established players — not necessarily high-priced stars — to start and contribute on defense. So, perhaps think more inside linebacker Joe Schobert than edge rusher Jadeveon Clowney. New coach Joe Judge reaching into his Patriots past for safety Devin McCourty or Jamie Collins is always a consideration as well. Cornerback Byron Jones must be considered, but his price-tag will be exorbitant for a quality, but not star, player.

“I told you guys the day I walked in the door: Offense scores points, defense wins championships,’’ Gettleman said. “That’s the way it is. From what I’m told, in the six Super Bowl games where it was the No. 1 offense against the No. 1 defense, the No. 1 defense is 5-1. I was on the wrong end of that stick [with the Panthers] in ’15. You know what I’m saying? You can’t expect your defense to hold someone to three points every week. You can’t do that. You can’t expect your offense to score 50 every week. You have to play complimentary football.’’

There has been nothing complementary recently about the Giants on defense. This has to change, but nothing comes without a cost.