In "Expenses", create a formula field that will use the date to output the month-year value of that record the same way your "Profit and Loss" table has it set up, i.e. "January 2024"
Then, in the "Expenses" table, go to a view where all records are visible and you have no groupings set up. Click the header of the formula field we just created to select the entire column then hit CMD/CTRL+C
Then click the header of the linked field to the "Profit and Loss" table and then hit CMD/CTRL+V. This should automatically link all your data
For new data, I'd recommend creating an automation that will trigger whenever the record in "Expenses" has a "Date" value set up appropriately, and its action would be to paste the value from the formula field into the linked field, automatically linking it for you