  We study the generation of baryon asymmetry through the flavored resonant
leptogenesis in the $U(1)_X$ extension of the Standard Model. Being a
generalization of the $U(1)_{B\text{-}L}$, $U(1)_X$ is an ultraviolet-complete
model of the right-handed neutrinos (RHNs), whose CP violating
out-of-equilibrium decays lead to the generation of baryon asymmetry via
leptogenesis. We can also explain the neutrino masses via the seesaw mechanism
in this model. We consider three different cases for different $U(1)_X$ charges
of the scalar particle responsible for $U(1)_X$ breaking at TeV-scale. These
include the popular $U(1)_{B\text{-}L}$ and $U(1)_{R}$ models, as well as a
$U(1)_C$ model which maximizes the collider signal. We numerically solve the
flavored Boltzmann transport equations to calculate the total baryon asymmetry.
We show that all three cases considered here can naturally explain the observed
baryon asymmetry of the Universe in a large portion of the available parameter
space, while satisfying the neutrino oscillation data. We find that the
$U(1)_C$ case offers successful leptogenesis in a larger portion of the
parameter space as compared to $U(1)_{B\text{-}L}$ and $U(1)_{R}$. We also
perform a comparative study between the flavored and unflavored leptogenesis
parameter space. Finally, we also study the collider prospects for all these
scenarios using the lepton number violating signal of $pp\to \ell^\pm
\ell^\pm+$jets mediated by the $Z'$ boson associated with $U(1)_X$. We find
that HL-LHC may be able to probe a small portion of the relevant parameter
space having successful leptogenesis, if neutrinos have normal mass ordering,
while a $\sqrt s=100$ TeV future collider can access a much larger region of
the parameter space, thereby offering an opportunity to test resonant
leptogenesis in the $U(1)_X$ model.
