By faith Enoch was taken up so that he should not see death, and he was not found, because God had taken him. Now before he was taken he was commended as having pleased God. And without faith it is impossible to please Him, for whoever would draw near to God must believe that He exists and that He rewards those who seek Him. Hebrews 11:5-6.
The beginning of this chapter in Hebrews begins, Now faith is the assurance of things hoped for, the conviction of things not seen. By faith we understand that the universe was created by the word of God, so that what is seen was not made out of things that are visible. Hebrews 11:1,3. So both lived their lives having faith, believing and walking with God.
We all want to believe in something. Enoch believed in the righteousness of God and lived hating evil as God does. Noah had faith and obeyed God. He built a big boat to get ready for a flood that had never happened in the world. His inheritance was righteousness that comes by believing and obeying God. Everyone else did evil things and could not understand Noah.
By doing wicked things, some have chosen who they will follow. Noah chose obeying God and He inherited righteousness. He has told you, O man, what is good; and what does the Lord require of you but to do justice, and to love kindness, and to walk humbly with your God? Micah 6:8.
For the Lord God is a sun and shield; the Lord bestows favor and honor. No good thing does He withhold from those who walk uprightly. Psalm 84:11
By faith Noah, being warned by God concerning events as yet unseen, in reverent fear constructed an ark for the saving of his household. By this, he condemned the world and became an heir of the righteousness that comes by faith. Hebrews 11:7