How can I make my mob spawners work?

The reason is because mobs only spawn from 148 blocks away from caves, if it is closer, the mobs will spawn in the caves instead of the mob farm. There's a solution to this. You can build the farmer on the ground but only if you lit up all the caves and dark spots in a 148 blocks radius. You can do one out of the two, either build it high up or build it on the ground and lit the caves in a 148 blocks radius, it's up to you. Wish you good luck!