Buy from actual electronic hobby companies.
Time was, that'd have been Radio Shack and Heathkit, but now it's Sparkfun and Adafruit. And Radio Shack and Heathkit!
The difference between them and Mouser is they're actually targeting hobbyists, so they are more likely to have assortment kits for hobbyists.
Buy from Amazon proper
People think if they buy from Amazon, they're buying from Amazon.
Nope. Jeff Bezos has opened up every part of the business - servers, warehousing and the Amazon storefront. As a result, the storefront is basically eBay - flooded with that hellish flea-market "fell off a truck in Shenzhen" Alibaba junkstream.
The stuff actually from Amazon "proper" seems to adhere to the same national safety laws as the bricks and mortar stores... though those safety standards don't include usability or durability.
However, very little in the electronics space is actually from Amazon Proper.
The product page has a subtle sign of whom you're really dealing with, but it's almost like Amazon tries to hide it. Here's what it looked like two Website editions ago. Now, it's directly under the "buy" button.
Not picking on Uxcell, they just happened to come up for the search.
Buy from vetted vendors on Amazon
These would be when you identify responsible companies that make a good product, and just happen to sell on Amazon Marketplace.
They might do this because, like many businesses, they're already using Amazon Fulfillment to ship orders they take themselves... so listing the item on the Marketplace is pretty much throwing a switch.
For certain SKUs, such reputable vendors will be most of the sellers, since they're name-branded and low-demand, so not really worth counterfeiting. You can at least screen reputable vendors that way. Although once you identify one, you are better off dealing with them direct. You'll know they're legit if their package arrives in the normal manner of domestic shipping, not dropshipped from Amazon or ePacket from China.