How do I change the node title when saving it?
To do this without writing code, the module you want for Drupal 9 is Automatic Entity Label.  Nodes are entities, so you can use this to set the label (title).