Make a select field with new option created by the user

I want to add a doc field as a select option, in which the user can also create a new option when they wanted.

Please, anyone, help me to sort out this problem. I just follow the item group doctype of the ERPNext but it did not work.

I resolved it myself. It just needs another doctype for that field and linked it to the main doctype.