This is another of those classic American/British English differences. Shop is British English, and store is American English. Pretty well known, and nothing too confusing. They both come from slightly different origins, but came fairly logically to mean the same thing.
Store is pretty straightforward, referring to a place in which goods were stored in order to then be sold.
Shop is probably derived from Old English words referring to simple farm structures, but in medieval times most shops were places where goods were both manufactured and sold, like a blacksmith’s shop, or a baker’s shop. In more modern times, goods tended to be manufactured away from where they were sold, in factories, but shop remained as the term for the place where the goods were sold.
Why did store come into use in American English, when shop continued to be used in British English? Partly, I’m sure, just to be distinct. But also, I suspect, because American English came about during modern times, and it made more sense to refer to stores, as establishments where goods were stored and then sold were more common than places where goods were both manufactured and sold.
Of course, the wod shop is used in American English, but to refer to places where goods are manufactured or repaired, e.g. shop class, body shop, keeping its older sense.