Closed loop NEMA motors

I would like to modify the motor installation and use a NEMA 23 closed loop motor instead of the NEMA 17 with encoders on the x-axis.
Would this be possible? What’s the differnce between using the encoders and the closed loop?

Thanks in advance
brico