Rendering only what is viewed by the player?

Hello!
I’m trying to figure out a way to only render what the player sees or what is close to the player in order to not slow down gameplay, is there a coding in order to do that?
A little bit like Naughty Dog did it for Crash and Bandicoot, if you know what I’m talking about…
Thank you!

The things that you look for are called Frustum Culling and Occlusion Culling. Regarding the latter, look at this question, there you can also see how to debug-draw the occlusion so you can see what effects it has in your scene:

The engine does that automatically.