By your standard, if the covid vaccine doesn’t produce immunity then the flu vaccine doesn’t, either.
The mechanism of a flu or covid shot is exactly the same as any other vaccine; the only difference is the degree of efficacy due to human mucosal immunity not having evolved to fully block infection from respiratory viruses.
https://journals.plos.org/plospathogens/article?id=10.1371/j...