The term scapegoat is derived from the Book of Leviticus 16:8
And Aaron shall cast lots over the two goats, one lot for the Lord and the other lot for Azazel.
Azazel, meaning “for complete removal” in Hebrew, has become translated to scapegoat in English over the millennia since. The sins of the people would be given to this animal and banished to the wilderness. The other “for the Lord (the Hebrew god, YHWH)“ goat, I think, can reasonably be interpreted as the favored Golden Child in the narcissistic family dynamic. It bears mentioning that both goats are sacrificed but only the scapegoat has a fighting chance, albeit a very poor one.