Herpes, or any other STD, doesn't go through clothing, including underwear.
You also don't get STDs from touching with your hands, even if you touch your mouth after. There's too much movement and exposure to air for STDs to transmit that way.
Even if she had herpes, it isn't transmitted from the thick skin on the butt cheeks. It would only be transmitted from the thinner, moist mucus membrane skin, like the vagina, vulva and anus.
You're fine and had no risk at all.
Don’t worry , if you get symptoms gets tested.