Do you think the GG would replace Trudeau without Trudeau resigning first?!?!?!?
No of course not. As of now Trudeau does have the confidence of the house. As long as he has it he is PM.
The person who has the confidence of the house becomes PM regardless of what party they belong to even if they don't belong to any party.
Technically Canadians do not elect a PM or a party. We elect representatives. Any MP who believes they have the confidence of the house (and can make a reasonable argument that they have it) can approach the GG and ask for the opportunity to form government. The individual give a throne speech. If they have the confidence of the house they become PM. If they don't the GG has to evaluate if anyone else might win the confidence of the house and will ask them if there is. If not another election has to be called.