Direct and indirect excitons in Rydberg states in transition metal trichalcogenide (TMTC) monolayers, bilayers, and van der Waals (vdW) heterostructures in an external magnetic field are studied within the framework of the effective mass approximation. Binding energies of magnetoexcitons are calculated using the Rytova-Keldysh potential for direct magnetoexcitons and both the Rytova-Keldysh and Coulomb potentials for indirect magnetoexcitons. We report the magnetic field energy contribution to the binding energies and diamagnetic coefficients for magnetoexcitons that depend strongly on the effective mass anisotropy of electrons and holes. The comparative study of TMTCs and phosphorene is given. In TiS3, TiSe3, and ZrSe3 the excitonic binding energies and diamagnetic coefficients demonstrate the same kind of anisotropy as in phosphorene. In contrast, ZrS3 has the opposite anisotropy to phosphorene. The tunability of the binding energy of direct and indirect magnetoexcitons by the external magnetic field and the possibility to control the binding energy of magnetoexcitons in vdW heterostructures by manipulation of numbers of hBN monolayers are shown.