This linked page contains a very nice summary of the first, second and third lines of defence: https://old-ib.bioninja.com.au/standard-level/topic-6-human-physiology/63-defence-against-infectio/lines-of-
Essentially, the first two lines of defence are innate, the first is passive such as skin...