In the emerging field of cavity optomagnonics, photons are coupled coherently to magnons in solid-state systems. These new systems are promising for implementing hybrid quantum technologies. Being able to prepare Fock states in such platforms is an essential step towards the implementation of quantum information schemes. We propose a magnon-heralding protocol to generate a magnon Fock state by detecting an optical cavity photon. Due to the peculiarities of the optomagnonic coupling, the protocol involves two distinct cavity photon modes. Solving the quantum Langevin equations of the coupled system, we show that the temporal scale of the heralding is governed by the magnon-photon cooperativity and derive the requirements for generating high fidelity magnon Fock states. We show that the nonclassical character of the heralded state, which is imprinted in the autocorrelation of an optical read mode, is only limited by the magnon lifetime for small enough temperatures. We address the detrimental effects of nonvacuum initial states, showing that high fidelity Fock states can be achieved by actively cooling the system prior to the protocol.