Below is how I would get what you're looking for. Just a few slight changes to what you already have.
For this example, I'm using the following Excel Table.

See full flow below. I'll go into each of the actions.

List rows present in a table retrieves the rows from our Excel Table.

Select maps the NameID and the Email.

Style HTML table is a Compose action (I just renamed it) that contains some CSS for styling our HTML table (make it look nicer in the email).
<style>
table {
border-collapse: collapse;
}
table td,
table th {
border: 1px solid #ddd;
padding: 6px 20px;
text-align: left;
}
table th {
background-color: #1C6EA4;
color: white;
}
</style>

Apply to each iterates over each unique NameID/Email. It uses the union expression directly in the input (don't need to create a variable for this).
union(body('Select'), body('Select'))

Filter array uses the output from List rows present in a table and filters on NameID equals the current NameID we are iterating over. See expression below.
items('Apply_to_each')?['NameID']

Create HTML table uses the output from Filter array and maps each of the fields we want to show in our HTML table. IMPORTANT: The field names you use here should match exactly what you have in your Excel Table.
//Name ID
item()?['Name ID']
Invoice Number
item()?['Invoice num']
Order Number
item()?['Order num']
//Additional fields
item()?['Field Name']

Send an email uses the output from Style HTML table and Create HTML table in the Body. And it uses the following expressions to get the NameID and Email.
//To (Email)
item()?['Email']
//Greeting (Hi Lara,)
item()?['NameID']

Below are the emails that would be sent out in this example.

