That is completely incorrect
The on-field decision (correctly) wasn't made by the ref, but by the linesman (assistant referee as they are called nowadays). And that decision was that it was not a goal. The flag went up from them.
View: https://www.youtube.com/watch?v=QnESv9md1IM
At 3:32 "The flag has gone up". And you can see the Japanese players reaction to that.
VAR then overturned that decision.
Having seen the replay numerous times, I don't think the whole of the ball was over the line, but I don't think it was clear enough that the on-field decision should have been overturned.