According to the [Embassy of Japan in Canada][1],

A transit Visa is for travelers who are stopping over in Japan en route to another country due to flight schedules.

 - Canadian citizens and nationals of countries with Reciprocal Visa
   Exemption Agreements with Japan do not require a Transit Visa. ([List
   of the countries][2]) As of March 16 2023, Canada is on the Reciprocal Visa Exemption Agreements list. India is not.
-  No visa required for all nationalities if you are
   transiting through Japan within the same airport without leaving the
   secured area.

This information allows us to answer your question:

 1. If you do not need to leave the secured area of your arrival airport to take your connecting flight, you do not need a transit Visa.
 2. If you need to leave the secured area, you do no need a transit visa if the passport you use to travel is on the Reciprocal Visa Exemption Agreements list. If your nationality is not on the list, you need a transit visa.

Some reasons you could have to leave the secured area are:

 - Change of airport for connecting flight.
 - Change of airport terminal.
 - Layover too long to stay in the secured area (not all airport terminals are 24h).

  [1]: https://www.ca.emb-japan.go.jp/itpr_en/transit_visa.html
  [2]: https://www.mofa.go.jp/j_info/visit/visa/short/novisa.html#list