Can you get pregnant if a guy touches his penis and then a vagina?

No, ... Considering high fastidious requirements for sperms to survive, your described scenario should pose an zero odd to conceive. Nevertheless, in life reality, always do HPT in 7-10 days after missing expected period and repeat it in another 7-10 days if the first HPT is (-) & still in doubt since no known contraceptive brings 100% success but abstinence.