Adding a bit of hands on clarification to focus
shifting with D850 or Z 7
1/ Decide how many steps you need and what focus step distance you need.
With a few test runs with different numbers of exposures and different size steps you should quickly learn what is "about right" for the types of subject you want to focus shift.
2/ Set the camera and lens to AF
3/ Although perhaps counter intuitive to those who may not have done focus shift, use the focus ring to focus just in front of the subject even though the lens/camera are set to AF
Do not touch the shutter button (or back button focus) as, if you do, AF will refocus where you do not want the sequence to start.
4/ press start in the menu
The rear monitor goes blank, briefly displays each image taken, and eventually displays the final image in the sequence.
5/ One "trick" is to photograph your hand at the start and end of a sequence to separate shifted images in a sequence from others.
6/ download the shifted images, and edit them as a group in your preferred software.

Helleborine - Green flowered - still to sharpen etc - taken in windy conditions.
--
Leonard Shepherd
In lots of ways good photography is much more about how equipment is used rather than the equipment being used.