Two issues are at odds here:
Mob cap and despawn sphere. Any mobs more than 128 blocks from any player will despawn immediately, meaning if you build your farm in such a way the only spawnable blocks within 128 from you are the spawn spaces of your farm, all the spawn attempts that succeed are within your farm and it works fine - if you allow even a small number of spawn spaces outside your farm (unlit caves), they will quickly fill up with mobs, which will only despawn slowly, filling up mob cap, and your farm will produce an absolute pittance of drops. So, "building high" is a decent solution to this problem.
Spawn attempt success chance. To spawn a mob, the game first picks a random x, z coords around the player, then randomly selects the y coordinate (altitude) between y=0 and the highest non-air block in given (x,z) column. If that block is spawnable, and other preconditions (light level, mob cap, biome, enough room to fit the mob) are satisfied, the spawn succeeds. Obviously if your farm is, say, 10 spawning floors located with top-most block at y=100, the chance the randomly selected block is one of these spawning floors is twice that of your farm ending at y=200 - the latter has twice as many non-spawnable spaces of empty air underneath the farm. That means farms built high have significantly lower rates than farms built low - in particular, the state-of-the-art EOL mob farm has between 1 and 2 blocks of height, and its rates are plain incredible.
Now if you are building a farm just for the mob drops, the solution is pretty simple: Build your farm low above the ground, or even partially in the ground, create your AFK platform slightly less than 127 blocks above the lowest block where mobs of your farm can be (usually the kill platform) and
spawnproofing the bit of terrain that is included within the sliver of despawn sphere that intersects the ground, if any - if the ground is at y=63-64, your afk spot at y=200, and the kill platform of your farm at y=75, you're fine. Note: build the afk platform slightly to the side, not to overlay any of it directly over the spawn platforms of the farm, that way you're not cutting into the spawn rates by increasing the farm height needlessly.
The problem is if you want XP or use looting to increase drops - the mobs must be brought to you. At that point you have the choice of building your farm really high, so that the mobs fall down to a chamber in front of your afking spot, which obviously cuts into the farm's rates as described previously - or you deliver the mobs from the "low" farm using mechanics like bubblevators, which take their sweet time - as result the number of mobs alive at any given time increases and you're likely to hit the mob cap - farm ceasing spawning as new mobs are brought. Or you can go the ambitious route and either light up, or outright remove all potential spawning spaces outside your farm while building it as low as possible. (just note: mobs don't spawn within a sphere of 24 blocks from the player, so take this into account.)
Generally, if you want my opinion on the matter, the option of building the farm low, afk spot high is the best reward:effort ratio, and there are better XP solutions than a mob grinder.