Certified GKH Gardening Expert
Although it will be nearly impossible to point out the exact identity of this... I can say without a doubt that it is a type of euphorbia. As to which variety, this will be hard to tell. These will have a very similar care to the crown of thorns type of euphorbia, but is technically more of the cactus variety, so you can get away with less water than a crown of thorns. I will include articles for both crown of thorns care, and cactus type euphorbia care, and you can care for it with a combination of the two. They are very forgiving, and will tolerate conditions outside of their comfort.
Crown of thorns:https://www.gardeningknowhow.com/houseplants/crown-of-thorns/crown-of-thorns-houseplant.htm
Euphorbia cacti: https://www.gardeningknowhow.com/ornamental/cacti-succulents/euphorbia/caring-for-dragon-bone-plants.htm