There is no Covid test requirement for your flight from SFO to YVR, just the ArriveCAN. If you take the PCR test in SFO more than three days before your cruise departs, that is too early. You need a Covid test for boarding the ship and, maybe, another ArriveCAN depending on the cruise itinerary.