I bought a Quest 2 recently since I wanted to more easily bring my VR set up to friend's houses and show it off. I thought that I'd be able to sign in with the oculus account that I use on PC and asses all the games I've bought on that account. But for some reason when I put on my Quest 2 and go to download Beat saber it says that I haven't bought it yet.
Just to test things, I bought OhShape on the app so I could play it on the Quest 2. After I did so OhShape became free to download on the PC version of Oculus. So when I buy a game for my Quest 2 it becomes available for my Rift S, but not the other way around.
Games on this list are cross buy https://www.oculus.com/experiences/quest/section/2335732183153590/#/?_k=ubp2r3 a purchase of any app on the link provided gives a free purchase on the quest or rift vice versa.
Unfortunately, not all games are cross-buy. Beat Saber for instance is not. You must buy it on both platforms if you want to play on both. However, the song packs are shared across platforms (Rift and Quest)
This page lists the games that are cross-buy. If a game is not on this list, but is available on both platforms, you will have to buy it twice. https://www.oculus.com/experiences/quest/section/2335732183153590/#/?_k=ed8wkq