I'm a young man who when I was 14 year old I used to masturbate. I have stopped this. In the first Ramadhan I fasted, I did it in four days in all the month. I didn't know that such doings break the fast. What should I do to correct this mistake?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
You should sincerely repent to Allah, seek His Forgiveness and perform good deeds as much as possible. In fact, masturbation is not only forbidden during Ramadan but it is forbidden at all times.
You should know that the masturbation that did not result in ejaculation does not annul the fast. Therefore, you should make up for all the days of Ramadan in which you masturbated and ejaculated.
Allah knows best.
You can search for fatwa through many choices