Check below example that matches your requirement :- https://salesforce.stackexchange.com/questions/211600/lighningrecordeditform-not-able-to-create-a-record-if-master-detail-relations
Please mark as Best Answer so that it can help others in the future.
Check below example that matches your requirement :- https://salesforce.stackexchange.com/questions/211600/lighningrecordeditform-not-able-to-create-a-record-if-master-detail-relations
Please mark as Best Answer so that it can help others in the future.
Regards,
Priya Ranjan