Add new link when add a new content


I want to add a new menu link programmatically when i add a new content(new node) in Drupal 8.

lets say i have this menu
Main menu:
and i have one content type with title and body and the menu parent(animals or plants)
i want to add a new animal so when i add a new content for an animal, create a new menu link under Animals.

can you please help em with this.

Thanks 🙂

Drupal version: