It looks like the file permissions on the flatpak folder in your home directory (or possibly your home directory as a whole) are broken. Have you possibly ran a GUI program with sudo or ran some script that could have caused this?
I'd start by resetting the ownership of the flatpak directory. To do this:
sudo chown -R ryan:ryan /home/ryan/.local/share/...