Objective morality is a myth
I would guess that the origin of morality is entwined with religion or faith in an omnipotent being. Those who have faith in a higher power are inclined to claim that morality is objective and I hate to discredit other's beliefs, as for some their faith is how they navigate the world, but perhaps that was the intent from the beginning.
To explain the connection I will attempt to go back to basics.
Humans discovered at an early stage that existing within a community was beneficial to each member, far more beneficial than a "lone wolf" approach. Anything from farming, to infrastructure, to technology, to language, and innovation; theyre products of our shared knowledge.
But what is to keep one individual from destroying everything that the community has built? An eye for an eye? That may only work to a certain extent before the tit for tat attitude brings an end to the social order.
Assigning a government or an authority would be the next step, to assert rules and guidelines, but how would they keep these in place?
It's unwise to rely on others to follow rules if there is no consequence (take the shopping trolly theory for instance https://www.google.com/amp/amp.hit.com.au/story/this-shopping-cart-theory-reveals-if-you-re-a-good-person-or-a-public-menace-154763) But we also cannot afford to lose members of our tribes by banishing or punishin them for wrongdoing. As there may be collective riots and protests.
From there we begin to devide society into classes in order to control the working population by limiting their education and imposing social constructs (e.g. that your station is set at birth and that is simply the way that the world works) the lower classes are less likely to question due to this lack of education.
But how do you stabilise those ideas? Well why not invent a narrative that dictates one will find eternal happiness and joy by obedience in this realm, but eternal damnation for 'sins'.
Hence morals are essentially created.
Apologies if this doesn't make sense I didn't want to miss an opportunity to join the conversation. But a migraine is preventing me from being able to collect my own thoughts very cohesively.
I also would like to say I don't mean to offend anyone by this take on religion, but personally the existence of God is more troubling to me than the lack of one would be and this is how I justify my perspective