How dio I change things on module installation?
I think what you are thinking of is configuration and overriding configuration. You can load any config object and set its value.

See: https://drupal.stackexchange.com/a/187488/57

Menu links are entities and can be loaded and changed too. See: https://drupal.stackexchange.com/a/225605/57