The best way is to chip away any loose mortar and retrowel new mix in. The easy way is to purchase some crack sealant made specifically for mortar replacement. It comes in caulking tubes for your caulk gun. All materials are inexpensive and dyi friendly.
Depending on the width of the crack... you might also consider pounding in a piece of treated wood instead of filling the space with something hard that will probably crack again soon.