This is just a very casual, even pop cultural characterization of how these two thinkers are commonly seen. I would expect people to have come across more substantive characterizations during an early high school history class, but perhaps I'm overgeneralizing my experience.
In any case, if you're looking for an approachable yet good book, I recommend reading Edward Feser's "Locke"[0]. The focus is obviously on Locke, but you can't really appreciate Locke without also getting into some Hobbes, which the books does.
GP here, I agree with you, my characterizations were both pretty casual to the point of flippancy. I could write y’all a deeper essay on this stuff, but hey, I have LLMs to herd, the 17th century wasn’t my period anyway, and there is already a massive amount of insightful writing about these two thinkers to dive into.
I would say Hobbes in particular is a complex and difficult and frankly eccentric thinker; don’t make the mistake of believing you understand him; he is weird. If you really want to grok the guy in the context of his culture and historical moment, you should just read Quentin Skinner. That’s hardcore intellectual history though; for the basics I’d just go for the clear and brief and informative Oxford Hobbes: A Very Short Introduction.