Apple has had a partnership with China for decades already who are responsible for the assembly process of Apple products around the world.
However, depending on how you buy your Apple products will determine how the product was shipped in the first place.
Having Apple products assembled in China then shipped to storage warehouses around the world until a customer makes a purchase has proven to be far too expensive and rather inefficient for Apple. Back in 1996, Apple implemented a new system called Just-In-Time manufacturing that worked by only manufacturing higher-end Apple products as soon as a customer places an order online. Then as soon as the product is ready it will then be shipped directly to the customer. This proved to be a lot more cost-effective for Apple and also proved to be beneficial to the customer for customisation reasons.
This system worked so well that it is still used today by Apple.
Take a look at the video below by the YouTube channel: Apple Explained on Why Apple Products Ship From China...