Every single stereotype is based in
truthpropaganda.
Most stereotypes have their birth in cultural propaganda. They reinforce the tribal in-group vs out-group that humans naturally fall into.
Stereotypes can form a few ways. Not all of which are based upon truth. Illusory correlation is the phenomenon of perceiving a relationship between variables even when no such relationship exists.