Go through these in order and stop at the first one that applies. If you are reading this for someone else, answer for them.
Confusion, inability to walk normally, breathlessness at rest, blue or gray coloring, collapse, or a seizure requires emergency action.
Contact local rescue or emergency services, provide oxygen if available and safe to use, and descend as soon as this can be done safely.
And for anyone, someone who:
Seek prompt medical assessment if symptoms continue after descent, repeatedly return, or include ongoing vomiting, severe headache, fainting, chest symptoms, or unusual shortness of breath.
These features may have another cause or may require treatment.
And for anyone, someone who:
Routine follow-up is appropriate after repeated AMS episodes, symptoms at relatively modest elevations, or uncertainty about what caused the illness.
A pre-travel visit is also useful for people with heart or lung disease, pregnancy, sleep-related breathing problems, or a previous episode of HACE or HAPE.
The article also says
Mild symptoms that fully resolve after rest or descent often do not require testing.
The person should remain symptom-free before considering any further ascent.
Returning upward should be gradual and should not occur after severe altitude illness without medical advice.
Every sign above is quoted from the sofidex article on Acute mountain sickness. If you are not sure, err upward — it is always reasonable to be checked.