The infinity gems were created in the big bang, the snap would unquestionably affect the entire universe. It may be different in the MCU, but I'm pretty sure in the comics Knowhere is an interdimensional hub so it probably isn't even in the milky way itself, and neither is Asgard.