Every lens has a minimum focus distance. Any part of the subject nearer than that cannot be made sharp, and stacking cannot fix it afterwards.
A lens focuses by moving its glass, and the glass can only move so far, so there is a closest distance it can focus on.
Each lens on the same phone has a different limit; lenses with more magnification usually have a farther minimum distance. The app shows on screen how close the current lens can focus.
After stepping back the subject looks smaller, but every part of it is sharp. Too close, the subject looks bigger but one part of it will always be blurred.
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.