Add data to Doctype A child table automatically when data in Doctype B get saved

Hi, has the title says i want to automatically add data to Doctype A child table everytime i create a new entry in Doctype B

Doctype A
Fields are:

company_name (data)
employee (Table → Doctype B) - Fields: {employee_name, company_name }

Doctype B
Fields are:

employee_name (data)
company_name (link) → Doctype A

What i want to do is everytime i create a employee in doctype B he automatically adds a row to the table of doctype A.