But the current versions of windows 10 only offer that if you don't have internet (no ethernet cable in, and answered "I don't have a wifi" in the screen before user creation), if you connected to the wifi it won't show the option for local account.
You can decline to create a Microsoft account but it will prompt you to make one again every time you install updates and there’s only an option to “remind me later”
But yes, if you get an script with the set of actions that make local accounts possible, you can replicate them.