This is a good history of the development of the 10mm casing and how the .40 came to be in response to the recoil of the 10mm. They are the same bullet except the .40 has a 3mm shorter casing than the 10mm. Less casing is less powder but also less recoil. This is a good read.
https://smallarmsreview.com/display.article.cfm?idarticles=3519