The precious stones Exodus 28:9 and spices were contributed by the rulers, who were more wealthy than the other Israelites.
Related Commentaries of Exodus 35:27
Exodus 35:27
27 And the rulers brought onyx stones, and stones to be set, for the ephod, and for the breastplate;