There are more complicated ways to tell the difference, but on the vine, it’s easiest to remember that no matter how small the blossom, a female squash blossom always has a micro-version of the eventual squash. (This is a butternut – you can tell from the shape.) No baby squash = male blossom. The males generally bloom first.
Male and female squash blossom pictures