Hebrews 11:7 and the simplicity of it:
"By faith Noah, being warned of God of things not seen as yet, moved with fear, prepared an ark to the saving of his house; by the which he condemned the world, and became heir of the righteousness which is by faith."
Was the salvation of Noah's house from the flood a matter of grace or was it something God owed them?
It was by grace, a free gift of God, not something God owed them.
Since the salvation of Noah's house was by grace, a free gift, then there was nothing Noah could do to earn it. Yet God made His free gift conditional, that reception of this free gift would be upon God's terms, not Noah's terms, and God made Noah's reception of this free gift conditional upon Noah obediently building an ark.
Was this obedient work in carrying out God;s command to build an ark a work of merit where God then OWED Noah's house salvation from the flood? No, for again, salvation from the flood was a free gift not soemthing owed, therefore there was nothing Noah could do to earn this free gift. Meaning his obeidence was NOT a work of merit done to earn this free gift but obedience in meeting God's terms to receive the free gift.
Note also that Noah build the ark to (eis) the saving of his house, that is he did not build the ark BECAUSE he was already saved from a flood that had not yet occured but in order to be saved from that impending flood. Noah' obedience in building the ark came FIRST BEFORE reception of ther free gift of salvation from the flood and that obedience eanred him nothing for the gift was already offered to Noah up front for free.
Hence when Paul puts obdience BEFORE justifification in Rom 6:16-18 we know that obedience does not earn the free gift of justification but is simply meeting the terms God has put upon His free gift in order for the gift to be received. Disobediene to God is rejecting the offer of God's free gift and as long as one continues in disobedience one continues to reject God terms thereby rejecting God's free gift.
IN THE SAME EXACT MANNER as salvation from the flood required obedience to God's terms, NT salvation comes with God's terms attached, those terms being belief (Jn 8:24) repentance (Lk 13:3) confession (Lk 13:3) baptism (Mk 16:16). NT salvation is a free gift of God's grace as was salvation from the flood so there is nothing one can do to earn NT salvation as there was nothing Noah could do to earn God's free gift of salvation from the flood. In like manner, both required obedience to God's terms BEORE reception of the free gfit and since it was a mater of grace and could not be earned then obedience is not a work of merit.
Noah obediently met God's terms by building the ark IN ORDER to be saved, NOT BECAUSE he was alrady saved.
Those Jews in Acts 2 met God's terms by repenting and being baptized IN ORDER to be saved NOT BECAUSE they were already saved.
And obedience on part of Noah or those Jews could not earn a free gift God already offered them up front, the most that could be done was obediently meet the terms God place upon His free gift which earn NOTHING for again the free gift was already offered up front for free.