What a canonical tag actually does
A canonical tag is a single line of HTML that lives in the <head> of a page: <link rel="canonical" href="https://example.com/product-a"/>. It's Google's official way to say "this URL is the definitive version of this content." When Google finds the same or nearly-identical content on multiple URLs, it uses canonical tags to decide which one to index and rank.
Without canonicals, you'll accidentally split ranking signals across duplicate versions of a page (www vs. non-www, http vs. https, trailing slash vs. not, tracking parameters, category paths). This shows up as pages that "should be ranking" mysteriously not ranking, or as "Duplicate without user-selected canonical" warnings in Google Search Console.