When batting team needs 4 runs for victory, batsman playing and ball going for boundaries but not completed the boundary the batsman took the stump for enjoying victory. Is that boundary is valid ?
The ball didn't get the boundary. Of course it isn't valid.
The batsman isn't necessarily out either, but may have issues with Law 37 Obstructing the field and Law 41 Unfair play, especially 41.19 Unfair actions, if their actions caused the fielders to be disadvantaged in attempting to return the ball to the stumps or to obtain a runout.
The game is not over either. In the absence of prior offences of this type, the umpires are likely to call the ball dead, give a warning to the batting team's captain, award the runs obtained by the batsman up to that point, and continue the game normally.