
It’s more complex than that. God exposes Himself through nature enough that one could come to know God without exposure to the Gospel. Of course, it is much easier with the Gospel in your life, but still. Also babies not old enough to understand are commonly believed to be accepted into Heaven.
Romans 2:14-15 explains it the best in my opinion but Romans 1:19-20 also suggests a baseline salvation available to anyone. However I will say that there is a big difference between someone who is a good person but denies the Bible versus someone who is a good person but has never had exposure to the Bible