Hopefully this will help with what you're looking for.
For this example, I've used the following SharePoint List. It has a Title and a Single line of text column called Account Number.

And the following Excel Table that contains the Account Numbers that I want to delete from my List.

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

I'm not sure what your trigger is, but I've just used Manual trigger a flow.

List rows present in a table retrieves the data from the Excel Table (the Account Numbers that we want to delete).

Select will extract out just the Account Numbers into an array. Note that Map is set to Text mode (See screenshot).

Get items will retrieve all the items from our List.

IMPORTANT - You mentioned that you had thousands of items. By default, Get items will only return the first 100 items. To cater for more, we need to go into Settings, turn on Pagination, and set the Threshold to a number greater than the number of items in your List.


Filter array uses the output (value) from Get items, and for the condition, checks if the output of our Select (array of Account Numbers) contains the Account Number for each item. This will give us an array of all the List items that need to be deleted.

IMPORTANT - At this point, you should save and run your flow to ensure it's returning the expected items in the Filter array (only items that need to be deleted).
Once you've validated the output you can move on to the following.
Apply to each will iterate over each of the items in our Filter array (the items that need to be deleted). And within the Apply to each we have a Delete item that will delete each of the items. The expression used for the ID is:
item()?['ID']

----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.