Go through these in order and stop at the first one that applies. If you are reading this for someone else, answer for them.
Get emergency help if the person has immediate breathing difficulty, is in danger, cannot communicate an urgent medical need, or may harm themselves or someone else.
Seek urgent medical assessment if speech changes suddenly, particularly with weakness, facial drooping, confusion, a severe headache, a head injury, or difficulty understanding language.
Arrange a routine assessment if you or your child regularly speaks in some settings but cannot speak in others, especially when this affects school, work, friendships, healthcare, or daily needs.
Support is also appropriate if the pattern lasts beyond an initial adjustment to a new school, language, or environment.
Seek an earlier appointment if anxiety is increasing, attendance is falling, eating or toileting is affected, or the person cannot report pain, bullying, or other important concerns.
The article also says
A sudden loss of speech in every setting is not the usual pattern of selective mutism.
Every sign above is quoted from the sofidex article on Selective mutism. If you are not sure, err upward — it is always reasonable to be checked.