I'm very inexperienced with Linux, so I'll try to explain what I did:
I allowed elementary OS to install flatpak by typing this:
sudo apt-get install software-properties-common
Then I installed Flatpak (which is apparently useful to install retroarch):
sudo add-apt-repository ppa:alexlarsson/flatpak sudo apt update sudo apt install flatpak
Then I installed retroarch with the command provided on their website:
flatpak install --user flathub org.libretro.RetroArch
After receiving the packets, I've been searching everywhere and there are no files named retroarch, libretro or flatpak on my computer so I'm lost.