Why does Stockfish want to capture with the knight when capturing with the queen pins the opponent's bishop and thus protects my other knight?

A place for new chess players to hang out, ask questions, discover tactics, get advice from others and learn more about the game: This is the r/chessbeginners subreddit.