How can you get the colliders of an object to only be at the edges of the object?

I’m creating a simple circular level that the player can walk around in, but I’m having trouble with the way I’m doing it. You see, I thought that adding a plane for the player to walk around on and a sphere for the barrier of the world would work, but the colliders of the sphere object exist inside the sphere as well as on the very edge of it, so my player object, since it is within the sphere object, has a funky seizure before plummeting into the void of the level. Is there some way (besides manually adjusting the colliders) to get the colliders of the sphere object to only work at the very edges of the object, or is it stuck being all throughout the object?

Better yet, is there a better way of going about creating a circular barrier?

There is not much of a way using physics. Unity has these primitive shapes for collision detection because they are very fast. The best solution would be to create either a low-poly mesh of your scene (considering it is 3D) and use that as a Mesh Collider. The most common solution would be to surround your scene with GameObjects that have BoxColliders that are streched out to cover a “wall” of your scene. Since collision detection for box colliders are very fast, it’s not uncommon to have even 50 of these “borders”.