Client-side rendering VS Server-side rendering
How client-side rendering works (CSR)
Think of client-side rendering like ordering any product from website, that comes in parts. When it arrives, you have to assemble it. So, the server would be the factory from where it is manufactured, code would be un-assembled product, and browser would be your home where you have to assemble it.
Some of the benefits of using client-side rendering are making client-side rendering easier than server-side rendering for the website owner, and it is cheaper option as well, because it reduces the loan on their own servers.
How server-side rendering works (SSR)
Think of server-side rendering, on a similar example as client-side-rendering, like ordering a product from a website, that comes to your home fully assembled and ready to use.
Also, there is hybrid rendering option – dynamic rendering. It is a mix of server-side rendering and client-side rendering. In general, when search engine bot tries to access the page, the website will send a fully-rendered page, but when user tries to access a page, their browser has to render it.
Taking everything into consideration, this might be the most preferred option because it is cheaper than SSR, but it gives you almost all benefits of using server-side rendering only.