There’s a bunch of mistakes in there, but can someone please elighten me as far as the ko is concerned? I don’t see the correct order I should have gone about it.
Ignore the ko and make sure the top stays dead?
That was a plot twist.
This move threatens to capture the four stones L14. You need to save them, otherwise White’s dead group becomes alive. Ressucitating the group K14 is much bigger than the ko you are fighting for. So after you play A or B, White takes the ko, you play a ko threat at C, White responds, you take the ko… and hope that White can’t find a good ko threat.
As @jlt pointed out, M13 was a valid ko threat, you shouldn’t have ignored it.
Your O7 atari response was interesting, but it doesn’t quite work. It forces white to either win the ko or connect at N8, but it also prolongs the ko and gives white the chance to take it back once more without a threat.
To finish the ko directly, you can connect it, then white can take neither of your two liberties (because that would be a self-atari), which gives you enough time to win the capturing race against the two white stones. But that would have been only possible, if white had not found a valid ko threat.
ETA: Apparently the AI doesn’t think the ko is big enough for black to fight at that moment (or something similar), but I think you can just ignore that, because it’s a too tough judgment call to make.