The guy would keep confessing to a girl who was his childhood friend and she would reject him until eventually she accepted, but she still didn't know if she liked him. Then he dies and she realizes she likes him, and an old lady brings her back in time but this time the boy doesn't like her.
It could be Toki o Kakeru Shoujo (the girl who leaps through time).
It has most of the element you talk about : She is able to get back in time, and at a moment, one of her friend confess to her. Taken aback by his declaration, she jump back in time, and each time he confess to her, she goes back in time, and do anything to try and avoid the confession.
At the end she realise she loves him, but for reasons, she can't go back in time anymore, and the guy she loves disappeared. But a lady allows her to get back in time once more.
I made a mistake, by stating that the movie was an adaptation of the manga it's more complicated than that.
The original is a short novel published in 1965 in studen aimed magazines, it was then published as a stand alone in 1967.
A live-action movie was then made in 1983.
The story became is so popular that it's part of japanese culture, and even today there is still medias reinterpreting it.
Such as the animated movie (2006), or a 4 chapter manga (2016).
I think I found it - it's called Mata, Kata Omou.
I know exactly which one you’re talking about but I’ve been searching for the longest since I forgot the name.
There was also a third friend involved and he confessed to the girl right before the main guy died. All three of them are in the art club and main guy was acting distant before he dies. When the main girl goes makes a deal with the old lady and goes back in time suddenly the guy has another girlfriend in her place. The main girl has long black hair with bangs and a small braid detail. Definitely a new manga since it only had a few chapters out. It was suddenly taken off the manga app I saved it on so now I’m here scouring the web