It really depends on the game, like others have said. Most of the time it is when the final boss is defeated/ending credits roll. Games like Chain of Memories I feel are only beaten when both stories are completed though. Nier I wouldn’t consider beaten until you’ve gotten at least 3 of the endings. Visual novels wouldn’t be beaten until most/all of the routes are completed.

Then there are MMOs where I feel like you can never really beat, but an argument can be made for beating all of the main story content released up to the point you are playing. Games like FIFA I feel are kind of unbeatable too outside of story modes, but I don’t play sports games too much. Racing games without a story mode or games like smash bros I probably consider beaten when you’ve unlocked most everything or gotten first place in every track.