Centuries, even millennia before, the concept was an important idea in formed civilisations, within established societies. Look at Hinduism, the Babylonians, Buddhism, ancient Judaism, to name a few - they all had variations of this belief. And it was an important aspect of these societies, because it served to bring people together, in collaboration, for the greater good, stability and safety of those societies. People learned how to cooperate and work together. And of course these things are conducive to a better society., Even for prehistoric and primitive , societies there’s evidence of form of morality that ensured better coexistence and collaboration, and therefore meant better out comes in terms of that groups survival.
Fundamentally so, morality is an innate aspect of the human condition. Jesus and the profits did invent this notion. They just perpetuated this idea during their life times.
However, despite his message to love thy enemy, Jesus never once condemned slavery, which you would think he would, given the claim he made about being the son of god, and the rest of it. You would think he would stand up for the slaves and denounce such a terrible system of oppression?. But no, he didn’t. So why didn’t he do that, given how horrifically amoral slavery is? Why didn’t he say anything against child marriage, so prevalent during his life time? If he was so all knowing and powerful, and teaching other kinds of morality, why didn’t say that child marriage is very immoral?
No Christianity did not invent morality.