Snape was a racist asshole to Lily's sister before any of them went to Hogwarts. But he was in love with Lily because Lily (unlike her sister) was racist-approved, despite her filthy Muggle heritage.
Lily was sorted into Team Gryffindor before either James or Snape (alphabetically, it went Evans > Potter > Snape), and when James was sorted into Team Gryffindor, Snape got jealous because he he saw James making eyes at his waifu. And yet, that jealousy still wasn't enough to get Snape to turn away from Team Slytherin, because Slytherin is the house that aligns with all of his racist ideals. Racism was more important to Snape than love, despite his incel whining about his unrequited love being the most important thing in the world.
James Potter made friends with Sirius Black, a kid who was thrown out of his house for rejecting racism, and let Sirius stay with him. James Potter learned how to become an animal in order to bridge the gap between himself and a kid who was afflicted with lycanthropy.
James and Lily became matching animals because they loved each other. They developed matching Patronuses because they loved each other. Snape made a copy of Lily's Patronus because he's an unhinged stalker.
Lily regularly stood up for Snape, despite everything Snape did and everyone telling Lily that Snape was trash. Until finally one day she took Snape's side after losing a fight with James, and Snape couldn't handle her pity, so he attacked her by revealing that he's disgusted by her Muggle heritage.
Snape went on to become a literal Wizard Nazi, and was fine with killing and torturing people, until the bridge too far was a threat against his unrequited waifu.
Snape is and always was 100% worse than James Potter. Doesn't matter if James kinda had some rough edges as a kid.