One reason that Autistic individuals are at greater risk for suicidal ideation is due to the fact that they are more likely to experience interpersonal trauma including bullying, harassment, discrimination, etc. I have seen this in practice. I teenager that I support has made a suicide attempt, and she has a history of interpersonal trauma including bullying, but also abuse from her former step-father. Thankfully she is receiving counselling treatment and has several other supports involved in her care and she is functioning better.
One think to do if you suspect that an individual is having suicidal thoughts is to find a quiet, calm, safe place to have an open conversation with the person about how they are doing. You might make a statement about what you’ve noticed in the person’s behaviour (such as withdrawal from others), and ask how they have been feeling lately. You can also directly ask if the person is having suicidal thoughts. This can communicate that you are open to discussing such topics, and that you are a safe person to disclose to who won’t punish the person’s disclosing behaviour.