This is a very cool question! Thank you for providing a image and location
The insect which made the spittle is in the Subfamily Aphrophorinae, which contains most if not all spittlebugs.
Spittlebugs damage plants by biting into them and sucking all of their nutrients out. The Spittlebug then uses the plant nutrients to create the spit which it will feed on when it emerges from its egg.
Spittlebugs damage plants by piercing plant tissue and sucking out juices. The damage stunts plant growth, distorts leaves and interferes with fruit production. Effective spittlebug control focuses on reaching these pests before they're covered in protective foam.
Source: https://www.gardentech.com/insects/spittlebugs
The species is best identified by range, as the only spittlebug in the Vienna area is the Meadow Spittlebug (Philaenus spumarius)
Philaenus spumarius, the meadow froghopper or meadow spittlebug, is a species of insect belonging to the spittlebug family Aphrophoridae. In Italy and America, it is economically important as one of the vectors of Pierce's disease (Xylella fastidiosa)
Source: https://wikipedia.org
The brownish thing inside the spit is the molt of the spittlebug.
Spittlebugs overwinter as tiny white eggs in plant stems. The eggs hatch in early to mid-spring. Over the next month or two, the nymph feeds within it spittle, molting two to four times. The nymph finally molts to an adult in late spring or early summer, emerging from its froth.
https://hort.extension.wisc.edu/articles/spittlebugs/
You should refrain from touching the spittle as it carries disease and touching it will spread bacteria:
...With a wide geographic range and the ability to thrive in climates spanning from Hawaii to just south of the Arctic Circle, the spittlebug is also a serious agricultural threat because it can carry bacteria from plant to plant while it feeds.
“Thirteen hundred host plants means 1,300 opportunities to spread pathogenic bacteria in natural and agricultural environments, a sobering wake-up call,” said the study’s lead author Vinton Thompson, a research associate in the Museum’s Division of Invertebrate Zoology.
The bug is also impactful as being a significant carrier of the devastating Pierce's Disease:
Philaenus spumarius is economically important as one of the vectors of Pierce's disease (Xylella fastidiosa)
Here are some examples of the meadow spittlebug:
Image one reference: https://www.inaturalist.org/photos/83085896, Photo 83085896, (c) Thomas Barbin, some rights reserved (CC BY-NC), uploaded by Thomas Barbin
Image two reference: https://www.inaturalist.org/photos/140353568, Photo 140353568, (c) Paul van de Velde, some rights reserved (CC BY)
Image three reference: https://www.inaturalist.org/photos/77769829, Photo 77769829, (c) Mason Maron, all rights reserved, uploaded by Mason Maron