The gene names are assigned from the reference GTF used in upstream steps (when one is used). That GTF will have the genomic coordinates of the transcripts associated with that gene. The tool Extract Genomic DNA using coordinates from assembled/unassembled genomes can be used with a GTF input (and Custom Genome/Transcriptome Build, as needed).
Known gene names (those with a public identifier, not "genes" or "transcript" names auto-assigned by the tools)) can also be used at other sites to directly extract the associated fasta. Where to do this depends on the gene symbol type/name. UCSC supports most types through their Table Browser, but Ensembl, NCBI, and others also have fasta data downloads available.
Tutorials (many RNA-seq include DeSeq2): https://galaxyproject.org/learn/
Thanks! Jen, Galaxy team