The expression is ‘in vain’
They are synonyms, so you can use either.
Personally I tend to use ‘in vain’ with a past action, and futile with a possible action.
I tried to call my friend but she was sleeping so it was in vain.
It’s futile trying to call my friend after 9pm any night as she always sleeps early.