Where do the four minutes come from? Nobody knows.
The fourth official adds time for substitutions, injuries, celebrations and deliberate delay, but the figure shown is a minimum rather than a total, and the referee alone decides when to end the half. That discretion is why the displayed number and the actual added time rarely match.