I am on a Mac with MacOS Bug Sur/11.4 installed. 
when I open files using Pygame the files appear in the "recently used" folder, is there any way to prevent that?
I'm pretty sure there is no solution via code. You could check your computer settings to disable the recently used folder or simply remove the files from the folder. Hope this helped mate.
Image files used in Pygame appear in the "recently used" folder