If you like coffee then enjoy. There are hundreds of observational studies leading to headline claims trying to justify its consumption on the basis of good or bad health outcomes. Nature of these studies: they are unable to establish causality.

Medical Mythbusting Commentary for September 18, 2023

Source:
This amount of coffee a day is tied to a lower risk of depression and anxiety: study

Reference:
The association between coffee consumption and risk of incident depression and anxiety: Exploring the benefits of moderate intake