And it takes a few weeks after that second shot for full immunity to kick in. My vaccine details said two weeks after the second does for maximum immunity, but Moderna might be different.
And even then no vaccine is 100% effective in each and every individual. Without pre-vaccine tests it is also impossible to say whether or not a patient was already infected before getting the shot.