A canonical tag is how you tell Google "this is the main version of this page." You need it when the same content is reachable at several addresses, so the search engine does not treat them as duplicates and split your rankings.
One page often opens at several addresses: with and without www, with parameters like ?utm or without, with or without a trailing slash. To a person it is one page; to Google it is several identical ones. It does not know which to show and may rank all of them lower.
You add a canonical tag on every version pointing to the main address. Google understands the rest are copies and consolidates all the link weight and signals onto one page. Rankings stop splitting, and the right address shows up in search.
A free 30-second audit shows whether everything is fine on your site.
Check your site for free