I would recommend you go through the following links to familiarize yourself with what Power Query is and its user interface:
To copy/paste a query code in a new query (assuming Excel 2016, 2019 or 365), from Excel:
- From the Data tab > Get Data > Launch Power Query Editor... (Power Query editor opens)
- In the Queries pane (on the left side of the screen), right-click > New Query > Other Sources > Blank Query
- From the Home tab > Advanced Editor > select all > paste your code
NB: I don't think this will actually help you as if your Excel workbook doesn't have a Table named Table1, with the same column names referenced in the query you posted, nothing will work... :-(
Hope this helps anyway. Nice day...