Mob spawning radius?

From the wiki: https://minecraft.fandom.com/wiki/Spawn

Mobs spawn naturally within a square group of chunks centered on the player, 15×15 chunks (240×240 blocks). When there are multiple players, mobs can spawn within the given distance of any of them.

and later

Spawn conditions

Whether a spawn condition fails differs from the above determination if the game tries to spawn them in that biome. For example, dolphins can have pack spawns that occur inside of frozen ocean and deep frozen ocean biomes, but no other biomes. These rules apply to variants of the same mob, such as baby zombies and spider jockeys.

Each individual spawn attempt succeeds only if all of the following conditions are met:

There must be no players or the world spawn point within a 24 radius block distance (spherical) of the spawning block

[...]

So basically, mobs can spawn within a radius of about 120 blocks in any direction, but not within 24 blocks of you.