prebuild generates the ios/android folders and code, build actually produces an executable.
When building via EAS prebuild isn't run - just build - since running prebuild there would overwrite any customizations to made to the native folders. But when building locally via expo CLI the prebuild is a phase of build.