The anatomic neck of the humerus refers to the location of the physeal plate during development. During growth, bone forms at the physeal plate as the child ages. Once the child reaches maturity, the plate closes, usually during puberty. Different growth plates will close at different ages, with well-characterized ranges known for various bony structures. This pattern of plate closure can be used to assess a child's bone age, which can then be compared to their chronological age to assess for any delay in maturation. Returning to the humerus, the anatomic neck is mostly notable as a defined landmark but has less clinical application.
The surgical neck of the humerus refers to the narrowing of the humerus in the proximal diaphysis. The neck abuts the quadrangular space, a potential space formed by the margins of the triceps, teres minor, teres major, and the medial humerus margin (3 Ts + H, as opposed to the more medial triangular space formed by those same 3 Ts, but no H). Since this region is more prone to fracture, that means fractures in this area are more likely to damage the contents of the quadrangular space, namely the axillary nerve and posterior humeral circumflex artery.
|By BDB - You can find the picture here. Traced and colored the picture using adobe illustrator., Public Domain, Link|
To memorize the difference between the two, you can try a few different ways. First, A for anatomic comes before S for surgical, and the anatomic neck is more proximal on the humerus than the surgical neck. Second, the surgical neck is more often fractured and more likely to have surgical complications, so the name is associated with its clinical relevance.
And that's pretty much it! For me, learning anatomy was much more helpful when I could attach a narrative about some clinical situation in which that anatomy was relevant. Start with a basic framework of the location from a book like Netter's Anatomy and then search for clinical scenarios that help solidify the terminology in your mind. Hope this helps!