A vaccine isn’t helpful if you’ve already contracted the disease. A vaccine is provided to a healthy person to help train their immune system ahead of time so that when they encounter the pathogen, their immune system is well equipped to fight it easily. That’s done by exposing them to the parts of the pathogen required to recognize it (called antigens).
If you’re already infected, your body is already seeing the antigens for the pathogen. It’s just also getting beat up by the virus (in the case of COVID-19, it’s sandblasting your lung tissue, among other things). Even if the vaccine works perfectly, it isn’t going to do anything for you once you’re infected.