Unable to update/install anything

Can you run the following commands and show the output?

ostree --repo=/var/lib/flatpak/repo refs
ostree --repo=/var/lib/flatpak/repo show eos-runtimes:runtime/com.endlessm.Platform/x86_64/eos3.2

After that, try running the following:’

sudo ostree --repo=/var/lib/flatpak/repo fsck

This will take a while but hopefully completes successfully.