Yucca is any plant of the genus (group of species that are taxonomically related) Yucca. There are quite a few species in this genus, but fortunately for us, we can treat all the local ones similarly…
The flowers and flower stalks are edible and taste like cabbages to me.
We can eat them raw or cooked, though I find they leave an unpleasant aftertaste if you eat too many uncooked. Pick the flower stalks before they flower or they can get a bit stringy and inedible.
There are fruits that form on some types of Yucca, I’ve never seen one in real life, but they’re supposed to be edible. The whole plant is, in fact, edible, but with caution. eaves are very fibrous, but can be cooked or used to make string. The root is where one must be careful. It contains a high level of saponins (soap-like substances) that taste dreadful and can give you diarrhea , so you need to bake or boil the roots to break them down.
That’s Yucca, another garden surprise!