There are several ways you might lose your legal ability to make decisions for yourself. You might, for example, develop a mental illness which affects your ability to make decisions while you are unwell. Or you might have a serious car accident and suffer a brain injury, with permanent or temporary effects.
It could also be that you have had a learning disability since birth, and that you’re now approaching your 18th birthday. Your parents’ powers, as your legal guardians, to make decisions on your behalf will come to an end when you turn 18. If your parents want to continue to have that legal power, they have to apply to the Family Court to be appointed as your “welfare guardians” under the Protection of Personal and Property Rights Act.
In all these different cases, the approach of New Zealand law is to first establish whether or not you’re  considered “mentally capable”. If, in your particular case, it’s established that you’re not mentally capable then your powers to make decisions for yourself will be transferred to some other person.