What
@hg.wells said. And the caveat is that cannot sync to a different device, so guess that wipe/re-install cycle should retain Automations, new phone, not.
In Shortcuts, create a personal automation.
support.apple.com
And as
@RichT49 mentioned, restore from backup works as well (iirc, been a year+ since I setup a new phone).
How I make this a little easier is that my Automations tend to be one Action, Run Shortcut, which calls a Shortcut with the real work/steps. In addition to making it easier to re-store/re-create, also helps facilitate Automations that happen on regular intervals during the day (eg. every two hours) as there is no "Starting at time hh:mm and then every X hours/minutes" Automation. And code re-use, easier maintenance/modifications.