The bible says everyone knows there is a God <Rom.1:18–20>, (i.e. from the creation they know there is a Creator, also Ps.19:1–6). Rom.2:14–15 teaches that everyone has the law written in their hearts, so they know right and wrong. So all these nations other than Israel knew there was a God and they were sinners. If they followed the light they had, they would know how to please God and seek the knowledge of the Messiah through Israel, but they didn’t. Some came to know and please God from other countries, e.g. Ruth from Moab, Ninevah repented at Jonah’s preaching. And God is not limited, so He could reach out to individuals like He did to Abraham in the Ur of the Chaldees. But I would argue that God is just and doesn’t punish anyone who is not guilty, unless they are caught up in the punishment of a wicked nation, like Jerusalem.