Blender will use as much RAM as it needs to render the scene, until your system cannot provide those resources any more.
Usually, when the program needs more ram than installed on the hardware, the operating system will resort to "virtual memory", where the operating system will use a paging file (or "swap") on a hard drive to store the data that doesn fit in RAM anymore, not only slowing things down, but potentially crashing if the paging file is not large enough or gets currupted.
You have at least 4 choices:
Be patient and let the computer work, and crash and start over.
Or simplify/optimize the scene to match the limits of your hardware,
or add more memory to the system to meet your desired output,
or use a render farm or cloud computing.
As to why the specific scene you are trying to render is pushing the computer to the edge, there could be multiple explanations.
Subdividing can easily create a number of vertices that become unmanageable. The size of textures will have an impact on the resources available. Particles and simulations, deformations, moving armatures they also need heavy computing power, the number of samples, the size of the tiles, final render size, denoising and compositing will also need to RAM and CPU time. So start investigating how you can minimize/optimize the scene so that you can get something out of your computer.