I've edited my post to show 3 examples of sketches we tried to used. The First two were built in examples from the IDE and the other was from a youtube tutorial from RoboJax: control 28BYJ-48 Stepper motor with hand gesture using Arduino - YouTube.
We've been sure to follow the wiring schematics and the code provided from multiple sources. However, I do find it interesting that the built in IDE examples do not follow the same order as some other online sources, including your self has shown.