There's EmuDeck which does all of the work for you. There's also another newer package that does the same but I forgot the name. At least EmuDeck can be easily installed with a flatpak, no idea about the other one
RetroDeck bundles everything into a single flatpak and seems a lot saner, but is a lot newer.