On windows there is no special flag that can be set on a file identifying it as “executable”. Instead, Windows relies on a file content and/or extension (leaving out ACLs here). On *nix and derived systems (Linux, FreeBSD, macOS, etc, pretty much all the rest) — there is. An executable file can be a posix executable, or a text file script, that specifies interpreter in the first line, etc.
If you download a file on a macOS you won’t be able to run it just the same as on Linux.
Moreover, Safari will add “quarantine” flag to it as internet is considered unsafe source and you likely wont be able to open in any other app either.
MacOS applications, however, often being a bundle (I.e. directory structure with multiple files inside in a specific layout) as opposed to naked executables, are distributed zipped or in inside disk images. Actual executable is located inside the bundle (usually under /Contents/MacOS folder; you can control-click on any .app and select Show Contents to see it in Finder), with the proper flags already set. When you copy the bundle from the mounted disk image or extract from a zip file those flags are preserved, so you don’t have to set them manually. But for naked executable downloaded from the internet you need to do that — because safari does not (nor should it) determine what flags to set on what files for you, it’s just a browser.
Window is a whole separate deal: its rich legacy where backwards compatibility was paramount still informs many design choices decades later.