God has a goal to build an eternity we call Heaven. God is pickily sin-incompatible. He thus will only pick those He can bear with in eternity. For the matter, He sets Law to firstly assess entities' obedience. The assessment is followed by an open Final Judgment. Law is like a promise saying that "if you pass the Final Judgment of Law, God shall bear with you in eternity no matter what".
Mathematically (learn some statistics and probabilites) it's estimated that 2/3 angels shall enter Heaven by the degree of freewill granted to them. By the degree of freewill granted to humans, there shall be less than 1/3 humans who can pass the same Judgment of Law to enter Heaven. Humans are thus mathematically said to be "saved through the narrow gate".
Other than the degree of freewill granted, another factor jammed which mathematically affects the calculated outcome. The factor is that the much more capable and intelligent angelic beings can have a negative influence on the much less intelligent humans. This is prophesied as the "snake to Adam" effect. The end result is, under the influence of Satan and his angels, all humans are kept captive and have no hope to pass the Judgment of Law.
Humans as whole would fail the assessment of obedience as defined by Law followed with a Judgment. Humans as a whole can be wiped out by a flood after enough witnessing is done. God however provided a solution for this. Instead of assessing humans' obedience, humans' faith is assessed instead. Faith besides obedience is a determining factor on whether God would bear with one in eternity. Genesis imples that Adam failed on 1) lack of obedience, and 2) lack of faith in God.
In order to assess human faith instead of obedience, a justification must be made such that humans won't subject to the Judgment of Law as angels do. It's Jesus who filled up the gap such that a series of Covenants can be signed off and be granted to humankind. Humans now can literally and lawfully/legally "dodge" the Judgment of Law. Humans are now subject to the Judgment of Covenant aiming on the assessment of faith. The end result would be, 1/3 or less humans will be saved throught the narrow gate.
Summary,
Law is aimed on assessing the obedience of an entity with freewill. 2/3 angels would pass the assessment. By the degree of freewill granted, it's estimated that 1/3 or less humans would pass too.
However another factor jammed in, the 1/3 "bad" angels would keep all mankind captive to fail the assessment of obedience. 0 human can be savable in this case.
Jesus resolved the issue. By His self-sacrifice humans are now subject to the Judgment of Covenant. 1/3 or less humans will be saved in this case.
Judgment of Law;
It's an objective judgment on one's past and one's behavior. It's objective in the sense that a court trial will stand with valid witnesses.
Judgment of Covenant;
It's rather a subjective judgment provided by a capable and just God. It's not limited to one's past and one's behavior. God judges hearts and minds as well. It's even possible that the subject judgment, to a certain extent, can extend to one's future. God not only can judge the past and witnessed behavior, He can also judge one's heart and one's future. That's what a just God can do.
If you don't feel good about a Judgment of Covenant by the just God, you can always go back to the objective Judgment of Law. However it's prophesied that no human can pass such a Judgment of Law. It's not even a narrow gate, it's a dead end!