I built a mob grinder without a mob spawner so the mobs have to randomly spawn. It's a 20x20 dark area I made underground. Then I afked for about an hour and no mobs had spawned. I'm on the hardest difficulty and about 20 blocks away from the room but they just won't spawn. I'm not exactly sure what I'm doing wrong and why no mobs are spawning!
If you've built it underground, you'd have to lit all caves around, so the mobs won't have any other spawn possibility than inside your grinder. Your best option is to build it as high as possible (remember that on MCPE maximum construction layer is 128).
As an extra recommendation, I advise you build it over the far ocean. Usually, there are some islands near the shore. Choose one and, from its farthest (relative to the shore) boundary, count around 128 blocks towards the far ocean and then start climbing towards the sky as high as possible for your grinder to fit under 128.
With that distance, mobs won't have any other options to spawn but inside your grinder. Remember to stay around (but not too close, as you already did) for them to spawn.