The stellar mass function of quiescent and star-forming galaxies and its dependence on morphology in COSMOS-Web — arXiv2