An assumption about a group is a prejudice, and that's not always a bad thing.
If, back when humans were hunters and gatherers, someone had died after eating a poisonous mushroom it would have been wise for everyone around to avoid eating all mushrooms, even though they missed out on enjoying the safe ones as a result.
A negative prejudice against a group of human beings is bigotry, and that's not always bad, either.
For example, we teach our children not to talk to strangers. Even though there are far more good people than bad ones in the world, it would only take one bad stranger to kidnap our child.
Of course bigotry against people because of their race, religion, or national origin has done, and can do, a lot of harm, and I hope that sort of bigotry will eventually disappear as people get to know each other better.
Another bigotry that I hope will eventually go away is the kind against people with special needs. Since the Americans with Disabilities Act was passed it has been possible for many who would have been confined to their homes to be seen in public and that has helped a lot.
When I was young, back in the 1960s and 70s, I didn't have the kinds of racial and religious bigotry that were common back then and, like many young people during the Civil Rights movement, I felt a bit proud of that. But I was very prejudiced against two groups of people: those who lived in tract houses and old women who wore sensible shoes like oxfords. Now I've become a member of both of those groups! I guess it serves me right.