If your hand moves while a photo is being exposed, that photo is blurred and merging cannot save it. Small shifts between photos are aligned by the app.
There are two kinds of movement. The first happens while a single photo is being exposed: the image is dragged into a streak. That is blur, and it cannot be repaired later.
The second is the phone moving slightly between photos. This does not blur any single photo; the app aligns the photos before merging. Too much movement cannot be aligned and may leave double edges.
If most photos were blurred by shake during exposure, the app suggests shooting again.
These are the basic principles. The best way to shoot depends on you and on the subject — try a few times and you will find your own way.