Spore formation is an asexual mode of reproduction in which spores are stored in the sacs called sporangia and it bursts after the individual matures resulting in the dispersal of spores in the atmosphere,
Mosses are bryophytes and ferns are pteridophytes and they both reproduce through spore formation.
Final answer: Ferns and mosses reproduce by spores.