Google Tag Manager and caching Cloudflare

Hello. Using the Google Tag Manager Tag Manager, I want to set up a dynamic change of site content by condition. Will Tag Manager work correctly when using page caching on different Cloudflare servers?

If tags are not changed it should work with cached pages but I’m not sure if you need to do a cache purge after changes. It depends on if the Javascript code in your page needs to be updated or not and I don’t know how exactly GTM works to answer that.