@MSDigitalUser - by "file closed", I mean you need to ensure the Excel file on OneDrive is closed/not locked. The Patch will not work if you have the file open.
I ran a test using Excel hosted on OneDrive and the expression works for me:

The below is not the same formula I sent you, so I cannot comment. "Product" does not look like an ID field.
Patch(Table2, ForAll(TemplateGalleryList2.AllItems,{product:product, target_value:TextInput1.Text}))
Could you share the code you're using for SharePoint.
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.