Someone else has mentioned the Kurzgesagt resources, which are great. If you want something more formal, OME is also a great resource I think.
https://onlinemeded.org/spa/immunology
>I always assumed the body generated matching snippets at random and the law of large numbers would result in a match eventually.
Right. Antibodies have a Y shape, where the two tips of the Y are variable, and the base is fixed. The IgM are the completely random snippets that happen to match a wide variety of things. However, because it's chemistry, it's more subtle than match or no match. Think of it like a variable degree of stickiness.
When a pathogen is found, your body is going to iteratively mutate new antibodies and select those that bind the best to the collected antigens, until you have something very specific (= sticks very readily). I'm simplifying a little bit, but that's the process for generating IgGs that I was talking about.