My black swallowtails get carrots. I tried planting Zizia aurea... Unfortunately, it didn't seem happy in my garden... Nor does parsley... If I have to plant something annually, I'd better want to get some personal use from it... As I don't eat parsley, but do enjoy carrots...
Luckily, gardening for other butterflies is easier... cudweed for the American painted lady:
desmodium for the long tailed skipper
agalinis for the buckeye butterfly
coffeeweed for the sulphur yellow
pasiflora for the fritillary
paw paw for the zebra swallowtail...
popular trees for the tiger swallowtail...
And this cute little critter on the Virginia pipevine:
And... then there are plants for moths like richardia for the tersa moth
and honeysuckle for the hummingbird moth...
And the Imperial moth who uses various trees...
and so on....