What "Law" was Abraham justified under? He was 400+ years BEFORE Moses came into the scene, so, it cannot be the Law of Moses Paul "meant" when he said IF Abraham had been justified by works he would have something to boast about - but NOT before God. The Holy Spirit doubles down on that concept when Paul stated:
The Holy Spirit, through Paul and the writers of sacred Scripture repeatedly teach us that it is NOT by anything we do to merit, earn, deserve or otherwise get saved, but purely because of God's mercy and grace and if it's by grace, it can't be by works, because grace would not be grace. We receive this grace BY faith and is why God tells us we can KNOW we have eternal life.
What "Law" was Abraham justified under?
The law of faith, which requires works.
But wilt thou know, O vain man, that faith without works is dead? Was not Abraham our father justified by works, when he had offered Isaac his son upon the altar? Seest thou how faith wrought with his works, and by works was faith made perfect? And the scripture was fulfilled which saith, Abraham believed God, and it was imputed unto him for righteousness: and he was called the Friend of God. Ye see then how that by works a man is justified, and not by faith only.
And unto the angel of the church in Thyatira write; These things saith the Son of God, who hath his eyes like unto a flame of fire, and his feet are like fine brass; I know thy works, and charity, and service, and faith, and thy patience, and thy works; and the last to be more than the first. Notwithstanding I have a few things against thee, because thou sufferest that woman Jezebel, which calleth herself a prophetess, to teach and to seduce my servants to commit fornication, and to eat things sacrificed unto idols. And I gave her space to repent of her fornication; and she repented not. Behold, I will cast her into a bed, and them that commit adultery with her into great tribulation, except they repent of their deeds. And I will kill her children with death; and all the churches shall know that I am he which searcheth the reins and hearts: and I will give unto every one of you according to your works. But unto you I say, and unto the rest in Thyatira, as many as have not this doctrine, and which have not known the depths of Satan, as they speak; I will put upon you none other burden. But that which ye have already hold fast till I come. And he that overcometh, and keepeth my works unto the end, to him will I give power over the nations: And he shall rule them with a rod of iron; as the vessels of a potter shall they be broken to shivers: even as I received of my Father. And I will give him the morning star. He that hath an ear, let him hear what the Spirit saith unto the churches.