You can cast Spider Food without a target just to create a Food token. However, if you do choose a target, and that target is illegal at the time Spider Food tries to resolve, the spell won't resolve and none of its effects will happen. You won't create a Food token.

Artwork
Loading artwork…
Spider Food
Wilds of Eldraine · #186 · EN
Nonfoil—Foil—
Card rules
Destroy up to one target artifact, enchantment, or creature with flying. Create a Food token. (It's an artifact with "2,
, Sacrifice this token: You gain 3 life.")
To the giant spiders of Dunbarrow, there's little difference between fly and faerie.
Common · Illustrated by Mila Pesic
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
You can't sacrifice a Food to pay multiple costs. For example, you can't sacrifice a Food token to activate its own ability and also to activate Maraleaf Rider's ability.
Whatever you do, don't eat the delicious cards.
Food is an artifact type. Even though it appears on some creatures, it's never a creature type.