I want to write a program to stop a chess game if Stockfish decides that checkmate is unavoidable for a player as a learning exercise. I downloaded Stockfish for Mac and it gives what it thinks is the best move but I can't figure out how to get it to show those more specific notes
Stockfish is an UCI chess engine, so you shouldn't mess up with the engine. You will need to write a new chess GUI.
You can't. Stockfish is just a chess engine and engines dont have such functionality.
Those notes are created by Lichess application not by Stockfish. Lichess manipulates engine outputs to deliver sophisticated functionality.
If you like you can develop an application of a chess engine for this kind of feature using Stockfish or any other engine. UCI protocol (which is a standard protocol for engines) can help you developing such application.