They give a vague description of their data collection process here: https://www.similarweb.com/corp/ourdata/ I bet the raw data is pretty noisy (since most HN users probably won't e.g. allow a shady extension to report their browsing habits, Similarweb is likely only seeing a small sample of all traffic) but as long as the noise is uncorrelated with the demographics they're tracking, they can probably arrive in the right ballpark.
Or you could just ask dang: https://news.ycombinator.com/item?id=27656775 Although I'm pretty sure he said something like "Last I checked, about 50% of HN readers were in the US" a few years ago as well, so I don't know whether that info is up to date.
https://www.similarweb.com/website/news.ycombinator.com/#ove...
At least on desktop around 40% of the visitors are located in the US.
One could argue that the other countries are represented by expat Americans, but the US also has a sizeable immigrant community.