Many people class other things as sex, which aren't penis to vagina.
It depends on person to person. But for example I know a person who can't have sex with their penis due to medical reasons, so touching and massaging in certain ways, holds just as much importance for them.
I also know many who just don't get-off on having things inside them, regardless of these being inserted anally or vaginally.
Sex how days isn't purely focused on the genitals. Even when I did my sex educator training, we focused on other ways peope may enjoy it. Educators and teachers were taught to explain to students that it isn't just about reproduction but also thatthe pleasure side is important and that these feelings differ greatly from person to person - if it feels good and right to you, then that's god, and could be classed as sex depending on preference.
Please also note though that some girl on girl encounters are with people who don't really see themselves as a girl. I know someone who is F2M without surgery so far, but they desire to have a male penis. For them contact sexually with their partner is sex even without them having a penis currewntly.