Hi Jones,
I thought we should add a custom ribbon button at first to trigger your contact create function.
1. Download icons for custom ribbon button:
a 16x16 png icon, a 32x32 png icon, a 16x16 svg icon
You could download free resources in this website: https://icons8.com/
2. Create a solution and import your lead entity ,custom javascript and icon files as web resources into it.
3. Download Ribbon Workbench and import it as solution.
4. Import your lead solution in ribbon workbench.
5. Drag a button element in third section(form), I added it at left of New button, and make properties configuration to the button like screenshot below:

6. Add an Enable rule to the button:

7. displayButton function, only display the button when lead is qualified:
function displayButton() {
if (Xrm.Page.data.entity.getId() != null && Xrm.Page.data.entity.getId() != "") {
var id = Xrm.Page.data.entity.getId().replace('{', '').replace('}', '');
Xrm.WebApi.retrieveRecord("lead", id, "?$select=statuscode").then(
function success(result) {
if (result.statuscode == 3) {
return true;
} else {
return false;
}
},
function(error) {
alert(error.message);
}
);
} else {
return false;
}
}
8. Add createContactRecord function to the button(1), enable the show/hide rule for the button(2)

9. createContactRecord function
function createContactRecordFromLeadSubgrid(primaryControl) {
var formContext = primaryControl;
if (formContext.getControl("Competitors").getGrid().getSelectedRows().getLength() != 0) {
var data = [];
var selectedRows = formContext.getControl("Competitors").getGrid().getSelectedRows();
selectedRows.forEach(function(selectedRow, i) {
data.push(selectedRow.getData().getEntity().attributes.getByName("name").getValue());
});
alert(data);
} else {
alert("At least one record is required to create a contact record.");
}
}
10. publish both javascript web resource and ribbon button solution
(I test in OOB competitor sub-grid)
11. No selected rows:

12. Get selected rows data

Now we are close to your final requirement:
how would you like to create a new contact record? from one selected custom entity record or multiple? and which attributes are required?
Regards,
Clofly