Some games are cross play, meaning you can buy it for one platform and it is good for the other. It should tell you in the description of the game if that is the case so you will know when you purchase.
But certainly there are games you would have to buy for each platform.
The important thing to remember is that it isn't an Oculus Store, it's two separate stores.
One store is for the Rift which was the PC only headset, this is the store that has games that are developed for a PC and installed on the PC and uses the PC's power (CPU, memory, etc) to run the game.
The Quest Store is for games that are designed to run on the mobile processor that the Quest has and they're installed on the headset. A developer may choose to write a version of the same game for both headsets and so they would then be available in both stores, the developer may also decide that if you buy one version, you get the other version for free, that's cross-buy.
The confusion comes for some people because the Quest can now play both types of game, either as a stand-alone headset without the need for a PC or when connected to a PC, playing the Rift games that are installed on that.
Intel 5820K OC@4Ghz, Titan X (Maxwell), 32GB Corsair Vengeance DDR4, ASRock X99 Taichi, Samsung 500Gb 960 Evo M.2, Corsair H100i v2 Cooler, Inateck KTU3FR-4P USB 3 card, Windows 10 Pro v21H1 (19043.1348)