Both, the native macOS file chooser
and the cross-platform file chooser
have file filter drop-down lists (marked red above).
You need to change the filter to one that accepts TGF files. yEd offers two such filters, the "Trivial Graph Format (*.tgf)" filter and the "All Graph Files (*.gml, *.graphml, *.graphmlz, *.tgf, ...)" filter.
I recommend using the "All Graph Files" filter.