  The Standard Model (SM) is inadequate to explain the origin of tiny neutrino
masses, the dark matter (DM) relic abundance and also the baryon asymmetry of
the Universe. In this work to address all the three puzzles, we extend the SM
by a local U$(1)_{\rm B-L}$ gauge symmetry, three right-handed (RH) neutrinos
for the cancellation of gauge anomalies and two complex scalars having nonzero
U$(1)_{\rm B-L}$ charges. All the newly added particles become massive after
the breaking of U$(1)_{\rm B-L}$ symmetry by the vacuum expectation value (VEV)
of one of the scalar fields $\phi_H$. The other scalar field $\phi_{DM}$, which
does not have any VEV, becomes automatically stable and can be a viable DM
candidate. Neutrino masses are generated using Type-I seesaw mechanism while
the required lepton asymmetry to reproduce the observed baryon asymmetry, can
be attained from the CP violating out of equilibrium decays of RH neutrinos in
TeV scale. More importantly within this framework, we have studied in detail
the production of DM via freeze-in mechanism considering all possible
annihilation and decay processes. Finally, we find a situation when DM is
dominantly produced from the annihilation of RH neutrinos, which are at the
same time also responsible for neutrino mass generation and leptogenesis.
