client updates in the game itself

Good evening to everyone … Please tell me how to update the game client in the game itself. If possible by example. I don’t understand how to do this on the server so that it understands which files have been updated or added. How does the server read the files …? Or am I thinking wrong?