Magnetic field effect on trivial and topological bound states of superconducting quantum dot