@mavolyn- Welcome to Mayo Clinic Connect. Vaccines do not prevent new infections, however, vaccines do lower severe illness and death. Vaccines do not cure, they help your immune system fight off illness.
A vaccine forces your immune system to make antibodies against a specific disease. Then, if you come into contact with them again, your immune system knows what to do.
Are you asking because you think that you have COVID, or trying to decide if you will get a vaccine?
In regard to your question: " is it possible to determine whether they indicate a new infection or a pre-existing one?" Tests for COVID-19 determine if you have the virus, not if you have the virus not when you were infected. Reliable antibody testing can show that, but at this point, the test that is used for that doesn't include this information.
I accepted all vaccinations as they became available and had no unfavorable results. It is concerning that people are refusing vaccine because they know of cases that appeared shortly after someone was vaccinated. They assume the vaccine caused the infection!