Disabled cookies in Matomo Analytics and tag manager checkbox

I have disabled cookies in Matomo Analytics through the privacy administration section. For the Matomo tracking code, we implemented it using Matomo’s Tag Manager. I noticed that in the Matomo configuration variable, there is a checkbox to disable cookies. Do I also need to check this checkbox or is it not necessary?