Should I ask my best friend why she didn't text me before trying to kill herself
Why would you want to ask that?
I just really want to know why
They are going through a really tough time. Right now the best thing you can do is support them.
Maybe I'm wrong but I think she did it because of me.
Suicide is a complicated issue, and you should never blame yourself for someone else's attempt. The best thing you can do for her is let her know you're available to support her. I'm sure she'll need a good friend right now.