Elephants often have interesting shapes in medieval art. In some (most?) cases it seems like the artist was likely drawing from someone else's description of the animal since they had never seen one themselves (e.g. #14, #22, #34 and more in the gallery below).
I am sure some of them never saw an Elephant, but Elephants did exist in Europe. Charlemagne was famously given one. Louis IX gave Henry III one for the Tower of London which they managed to kill by feeding it too much wine.
https://bestiary.ca/beasts/beastgallery77.htm