When you swaddle a baby you make them for more secure and comfortable just like they would be in the womb.
Swaddling the baby helps by simulating the mothers womb that the baby was in before being born so yes swaddling the baby can sometimes help the baby sleep better as they'll feel more comfortable.
However not all babies like being swaddled so if they put up a fuss when you're swaddling never force the swaddling.
But if the baby does like being swaddled it can help keep them comfortable and feeling secure which leads to the baby sleeping better and falling asleep faster.
Sometimes when a baby is crying at night and won't get to sleep you can swaddle them and they'll sometimes fall asleep as long as you've made sure they're not hungry or need a diaper change.