Each device usually has 5 versions for each market (US, EU, China, Korea, Rest of the world) + individual board revisions.
And that's not counting the massive amount of devices they produce outside the flagships.
Let's pick the Galaxy S10 for example, you have the S10, S10+, S10e, S10 Lite, S10 5G. The US ones are on Snapdragon SOC, the other ones on Exynos SOC and each region has additional quirks...