Infinite loop of backing up files

My vault is stuck in an infinite loop of backing up its own files.

While doing some cleanup of my laptop SSD, I accidentally deleted my vault folder. After restoring it, Obsidian would not recognize the folder for some reason. So, I made a new folder for it to target for the backup within the old folder.
After I rebooted the computer, Obsidian now recognizes both folders as ones that need to be backed up. Since the second folder is within the first, this has led to the second folder being backed up infinitely within Obsidian. While I don’t know exactly how long this has been happening, this has led to over 40,000 files in this folder to be created.

I have designated that the folder not be backed up in Obsidian, but when I try to delete it through the program it freezes. If I try to delete the folder through the finder (I am on an M1 Macbook Pro), I get an error when starting the program as it freezes when it is loading cache.

What should I do???

I was able to fix the issue by not backing up the second folder and then going through and individually deleting the copied folders. Deleting more than 5 folders at a time (Each with about 670 files within) was the most I could delete at a time without the program freezing up.