Q.Yucca plant
How can I prevent my plant from dieting the leaves are turning brown 4 or 5 inches from the tips it’s also wilting?
The yellowing leaves could be a watering issue, in the case of a Yucca, you are likely overwatering.
They like to be on the dry side. Allow the soil to dry before watering again.
If the soil is soggy, the plant could be suffering from root rot.
Here is some links to help you.
https://www.gardeningknowhow.com/ornamental/foliage/yucca/yucca-plants-care-and-pruning-tips-for-pruning-a-yucca.htm
https://www.gardeningknowhow.com/ornamental/foliage/yucca/growing-yucca-indoors.htm