Enemies to lovers works when the conflict between characters has a real foundation. They may want opposing outcomes, belong to rival groups or interpret the same event in completely different ways.
Give each character a reason for their position. If one is protecting a family or pursuing a goal, readers should understand why it matters. Avoid making one character unreasonable simply to create friction.
The transition should happen through events that change what the characters know. Cooperation can reveal competence. A difficult choice can reveal loyalty. An apology can matter when it is followed by changed behaviour.
Do not rush forgiveness. If a character has caused harm, the story should allow the other person to react. Attraction does not erase consequences, and a romantic ending feels stronger when trust has been rebuilt.
Banter can make the dynamic entertaining, but the emotional arc needs more than clever insults. Let the characters discover something worth respecting in each other.