Question: how to change your name in minecraft with commands?
Answer: There is no command to change a player's name. As a workaround, you could fake it by hiding the player's name whilst teleporting a named entity onto them.