One decisive feature

Areoles = cactus. Cacti like Mammillaria spinosissima have discrete pads where spines and flowers emerge. Euphorbias such as Euphorbia trigona lack areoles and exude milky latex when cut.

Stem clues

Cacti show ribs/tubercles with areoles on each ridge; Euphorbias have angled stems with paired thorns along edges.

Safety

Wear gloves and avoid contact with Euphorbia latex; flush immediately if it touches eyes/skin.