I have a strict problem with the flathub cannot install the app on it

hello so i tried to install app from flatpak or flathub
but i got an error

----------- Logs ------------
Looking for matches…
F: An error was encountered searching remote ‘flathub’ for ‘io.github.Hexchat’: Unable to load summary from remote flathub: Error opening file “/home/lenovo/.cache/flatpak/system-cache/summaries/flathub.idx”: Permission denied
error: No remote refs found for ‘io.github.Hexchat’

and i switched to root and i installed Hexchat and it needs regular user but how can i fix this error

System: Debian 13 Testing (Trixie)
Architecture: x86_64

This was probably caused by running flatpak with sudo (although I can’t reproduce it).

You can simply sudo rm -rf ~/.cache/flatpak, but there may be other files owned by root in your home directory, especially within ~/.local/share/flatpak. You can check with something like find ~ -user root

i checked on the /home/lenovo/.local/share/flatpak but those files or folder just owned by root