In this video it is said that I have to stand around high up afk so that no creepers spawn in the caves under the farm. I'm too lazy to light up all the caves. Therefore: Can I simply build the farm at a height of 2-10 (around Obsidian) so that there are no caves under me and the creepers can spawn there?
(play Minecraft Java)
Monsters spawn not only under you, but also around you. You can think of it like a ball around you, 128 blocks in each direction and you are the center. And mobs are spawning all over the sphere.
Hence: No, you can't. Because then monsters would spawn in the caves around you and above you.
If you're too lazy to light up the caves, do what he says. Build the farm above the surface and stand 120-128 blocks above the AFK farm. Then only the creeper farm is in this spawn sphere, and therefore mobs only spawn there.