The web first began with static sites where HTML was written by hand, stored on a server, and returned to the client after a server request. Since those days, new ways of creating web apps have been developed. The original method of serving static sites has also been revived with a new modern approach. The three approaches to website development are: Static sites, Dynamic sites, and SPAs(Single Page Applications). Let me explain the differences and clear up any questions you may have.
Dynamic websites are the most common type of website on the internet. These sites generate HTML on the server side through the use of templating engines or a language like PHP. The content is generated per request and is served slower than its static site counterpart. These websites do well with SEO because the content the user sees is the same that a web crawler would receive. The impact on the server is greater due to the processing required for each request. The main advantage of a dynamic website is that they do not need to be rebuilt. When your data changes, the content will be shown updated on the next refresh, assuming no caching takes place.
There is no straightforward answer for which is best. What you should use depends on your use case.
Knowing about all of these options will help you next time you go to create a new site. Let me know if there's anything you need me to clarify in the comments section below.