The story of Cornelius in the Bible is a good response to this question.
In considering the story of Cornelius in the Bible, it is important to note that being religious is not enough to save a person. Cornelius was as devout as they come, and he worshiped the one true God. Yet he still needed to hear the gospel and respond to it positively.
https://www.gotquestions.org/Cornelius-in-the-Bible.html