In theory, an antibody test can detect the following:
- Spike protein antibodies that can be induced by either natural infection or vaccination.
- Antibodies to other parts of the virus that would occur through natural infection, but not vaccination with vaccines available in the US (but some vaccines available in other countries may induce those antibodies).
Whether or not readily available antibody tests distinguish between the two is not an answer that seems to be easily findable (some research studies have used antibody tests that made such a distinction).
Note, however, that some unlucky people generate few or no antibodies to either natural infection or vaccination.