thank you for your query.
It is highly unlikely that you could get pregnant.
particularly since you had your undergarments on.
And no penetrative vaginal intercourse occurred.
However, I would warn you to be more careful in the future.
in any case, if you miss your period by a few days, take a home pregnancy
Going by what you describe, the odds of pregnancy are next to nil.