My computer has integrated Intel graphics and a dedicated AMD GPU. But Linux is only running one of them and I wanted to switch to always be on the AMD.

I've solved this before in this forum, before it was changed, so now the thread is gone. Is there an archive of the old forum?
Otherwise, do you know how I could solve this? I think it somehow involved DRI_PRIME...

You have a few choices of where to use DRI_PRIME=1 : set DRI_PRIME=1 in /etc/environment, in your shell or in the environment for each command, eg "env DRI_PRIME=1 firefox".

I tend to set it in /etc/environment so it's applied for my desktop session.