Autoassign relationship when creating contact
You could achieve this with the CiviRules extension. The extension can be found here: https://civicrm.org/extensions/civirules and the documentation here: https://docs.civicrm.org/civirules/en/latest/

You should add a rule with trigger "Contact of any type is added" and then some conditions (perhaps on contact type or contact is in group if required). You can then use the action "add relationship".