Especially comparing it to the flu, as that's a virus that mutates much more often than most viri.
In any case no vaccine is 100% effective. The goal is typically to be effective enough that the virus dies out faster than it spreads. Which solves the problem.
There are a lot of covid vaccine trials going on. The different candidates have different properties. It has yet to be seen which candidates are succesful.