My parents were both brought up in an extremely legalistic "Holiness" branch of the church. I have always been grateful that they broke away from most of that when I was very young. Since my family already understood that true holiness wasn't a matter of adhering to a bunch of mostly non-biblical rules and regulations, the question of what holiness or righteousness actually was was a live question to me growing up.
Somehow--I can only attribute it to the action of the Holy Spirit--I gained the insight that righteousness came through faith. I don't recall hearing it from anywhere, although I'm sure that it was present in sermons that I've heard and forgotten. I know that when I was young the Epistles were mostly opaque to me. ("Why should I care about some old letters that people wrote to other people a long time ago?") I was mostly into reading narrative at that time--Bible stories. So I didn't directly get the message from Paul. But somehow the story of Abraham in Genesis caught my imagination, and the line, "Abraham believed God, and it was credited to him as righteousness" stood out to me. I'm sure I got it from Genesis, and not Romans or Galatians.