No. Canada is not part of the USA, so the fact that you went there first is irrelevant to your length of stay in the USA.
Short stays in Canada or Mexico after entering the U.S. apparently do count as part of the 90 days according to this question, though I can’t find official sources to back this up. But I don’t think this would apply even if you happened to transit through the U.S.
While an ESTA is needed for transit through the U.S., it allows multiple stays of 90 days, as long as they are not too close together (there is no specific limit). The rule about stays in Canada and Mexico is apparently to avoid “resetting” the 90 day period with a quick trip. One day transiting through the U.S., and then a month stay in the U.S. four months later, seems very unlikely to be interpreted as exceeding the 90 day limit–especially given that you will have a Canadian visa.
Some information is found on the ESTA site under the link “What is the Electronic System for Travel Authorization (ESTA)?” (unfortunately it can’t be linked directly, due to some dumb use of Javascript). It doesn’t discuss the Canada/Mexico entry issue, though.
Credit:stackoverflow.com‘
4 Mar, 2024
5 Mar, 2024
4 Mar, 2024
4 Mar, 2024
4 Mar, 2024