i think harry realized it first but i think louis said it first
you see, harry wears his heart on his sleeve. he loves openly, vulnerably, he loves with the literal words of love. hell tell you he loves you, hell tell you how wonderful you are, hell tell you how much you mean to him. and he does with everyone from fans to friends. harry seems to be okay with such forthright expressions of love, its just who he is. so when he met louis, he didn’t care that he was in the middle of one the biggest opportunities for his career, he didnt care that the world could be watching, he was falling for louis, and that was that.
louis is different. louis is guarded. he’s truthful, hes protective. he shows you his love through his actions. hell defend you, hell ask you how youre doing, hell listen to you. but hes not overly expressive or literal with his feelings—not all the time at least. but when he met harry, i think he was floored by harrys openness, and i think he enjoyed the personal challenge it brought him.
so when they were falling for each other, i think harry was very in tune with his developing feelings, and louis, though he remained open to the possibilities, may have been a little more guarded, all things considered. and when louis realized he loved harry—he loved his curls and his smell, his charm, his caretaking ways, his thoughtfulness, his sweet nature, when he realized he loved harry, louis knew he loved harry, and he was bursting at the seams and when he finally said it, he said it over and over and pronounced each word with absolute giddiness and his eyes were crinkled and his lips were kissing harry everywhere and he was bursting with love and harry had known for quite a while so he most definitely responded with ‘i know, me too.’