That associates statin use with depression, not cholesterol. That’s a huge difference. Those results (which are not an RCT) could easily be explained by those that are less depressed are more likely to seek any non-psychiatric outside medical treatment.
First: cholesterols are a family of molecules, like alcohols, not just one thing.
Second: statins inhibit cholesterols so while it is associated, it's good to mention that cholesterols are anti-depressive, which is something anyone with any university bio education will know.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7606915/