I analysed my page speed using google pagespeed insight and got below suggestion. Can any one help me how I can implement it.
Leverage browser caching
Setting an
You can't (you do not control the Google servers, so you cannot set http headers on their behalf).
Moreover, you do not want to. Google already sets cache control headers for the gtm script:
Cache-Control:private, max-age=931
"Private" meaning that the http response is intended for a single user and should not cached in a way that makes it accessible to many users (i.e. a proxy server). Max age is the maximum age for the document before it expires and must be re-fetched from the server. You probably do not want to fiddle with those settings in any case, because usually you want any changes you are making to the tag container propagate to your users quickly.
Google pagespeed is more of a guideline in any case. Setting http headers is that kind of over-optimization that might make sense for certain high-traffic sites, but most sites have other, simpler problems that can and should be addressed first.