For never vaccinated person:
Testing positive for antibody against either N, S, or RBD indicates prior natural infection.
For vaccinated person:
Testing positive for antibody against the vaccine antigen target, such as the S protein, and negative for other antigens suggests that they have produced vaccine-induced antibody and that they were never infected with SARS-CoV-2.
Testing positive for any antibody other than the vaccine-induced antibody, such as the N protein, indicates resolving or resolved SARS-CoV-2 infection that could have occurred before or after vaccination.