Americans say cookie, and the British say biscuit, because one of them borrowed a word from the Dutch.
Cookie comes from the Dutch koekje, "little cake." It is the diminutive of koek, "cake," which goes back to Middle Dutch koke. English cake is a relative, but a distant one. Etymonline says cake came from Old Norse kaka and shares a West Germanic root with Dutch koek and German Kuchen.
The Dutch brought the word to North America. Wikipedia says cookies arrived with settlers in New Amsterdam in the late 1620s, the Dutch colony that later became New York. The earliest American reference it cites is from 1703 and describes 800 cookies served at a funeral in New York.
The dates are messier than the story. Etymonline gives 1808 for the "small, flat, sweet cake" sense in American English. It also records cookie in Scottish English by 1730, meaning a plain bun, and says it is debatable whether that is the same word. The Dictionary of the Scots Language pushes the Scottish use back to 1701, and Wikipedia agrees. A Scottish word of the same shape could have reinforced the American one, but the sources do not settle it.
The British never needed a Dutch word, because they already had biscuit. In the UK and many other countries, a cookie is still a specific thing, usually a chocolate chip cookie, while biscuit covers the general category. South African English also uses cookie, and Etymonline credits Dutch influence there too.
Once the word was established in America, it grew a family of idioms. Etymonline records cookie as slang for a person, especially an attractive woman, from 1920. Its entry for smart dates smart cookie to 1948, and "that's the way the cookie crumbles" is attested by 1955. The spelling cooky is a variant.
Cookies as a food are older than the word. Wikipedia says they appear to date to 7th-century Persia, soon after sugar became common there, though it flags how they reached Europe as disputed.
Cookie is a small word, but it is a good example of how a colony's vocabulary can survive a change of rulers.