This isn’t solely linked to Covid, there’s been data available for years showing an association between exposure to general respiratory viruses such as the flu and subsequent psychotic episodes. There was a rise in cases of schizophrenia after the 1918 Spanish flu pandemic as well as after SARS and swine flu.
It’s thought to possibly exert its effect through cytokines (signalling proteins which regulate biological functions, including innate and acquired immunity), produced by cells such as microglia. This is then linked to changes in brain activity.