A canonical tag (<link rel="canonical">) tells Google which URL you prefer when several URLs show the same or nearly the same content. It is a strong hint, not a command. Google also weighs redirects, internal links, sitemap entries, HTTPS and hreflang before it chooses the canonical it will index. Canonical tag issues appear when those signals disagree, and the URL you want to rank is left out of the index.
You find them in the Page indexing report of Search Console, under "Why pages aren't indexed". These are the reasons that point to canonical problems: