Back when I wrote Spell of Slumber, I attended an online writing webinar and read a few articles on this topic, though I can summarize most of the advice in three key points.
1. Balanced Dynamics
First, you have to make sure your characters are balanced. One of the most common reasons people aren't invested in a romantic relationship is because they don't like one of the characters or hink that one character doesn't deserve the other. This occurs when you have a one-dimensional love interest who is just there for the protagonist to pursue, or if one of the characters is a perfect angel whereas the other has no redeeming qualities whatsoever. Therefore, make them both equally as likable and relatable. Note: you could still play around with characters of varying levels of morality or internal struggles, but just make sure that the reader actually cares about what happens to both of them. Even if this isn't the case at the start, as the story develops, the reader must find the love interest 'good enough' for the protagonist to remain emotionally invested or vice versa.
One easy way is to make them both equally desired/ talked positively about by other characters. Another is to ensure they do an equal number of good or bad things to/ for each other. In SoS, I rewrote entire scenes because one character was acting too hostile while the other became too accomodating instead. It's all about give and take. But this doesn't mean the main couple has to be likable either. In a certain book which I can't mention due to spoilers, both protagonists are equally bad people so when they end up together again, the reader is satisfied with this ending.
2. Compatibility
Malk already mentioned the gist of this, but you must show why these characters are meant for each other. Is there a reason the protagonist should end up with this other person, as opposed to another side character or even the antagonist? Answer this question consistently throughout the storygame, whether through moments where they challenge one another to grow, help each other correct their misbeliefs, or discover that they understand one another like no other side character can.
A technique I like is to temporarily put your main couple with different people, make things go badly, and have them realize how much their true love interest actually complements them. Alternatively, tropes like forcing them to work together to show their combined strength or have them support each other in difficult times may be helpful. Just be careful that it doesn't become a toxic trauma bond instead.
3. Affection
Your characters have to bond, whether this means sharing secrets or letting down their guard around the other person. There's a rule that goes something like this: if they have to kiss for the reader to know they're in love, you're not writing the romance well. Even if they start with an awkward first encounter or begin by hating one another, as the story goes on, allow their dynamics to naturally change.
My favorite scenes are: deep conversations (potentially with arguments to show a clash of beliefs), us-vs-the-world mentality (use it for high stakes stories) and saving one another from danger (physically, emotionally, etc). Some characterization ideas include: an independent character being forced to rely on one another, a betrayed character learning to trust again (you could add a plot twist if you want to play with readers' emotions) or basically any characters that can overcome a misbelief through the relationship. It also helps to give both characters a goal that isn't falling in love, as this makes them better developed characters. Bonus points if their goals conflict with one another's.
Bonus tips based on comments I've received:
"The magic of a good romance is for me that the couple has to have a life of their own beyond their romantic interest, but by being together with their loved one makes them a better person overall."
--- Darius
"I've read a lot of bad romance in fantasy as it seems to take a backseat to the action that's going on in the story. I loved how you have woven it into the narrative."
--- Axxius
"It reminded me of how the strongest relationships often begin with that rare ability to just be ourselves, flaws and all, with someone else."
--- MrCrimson