Serverless functions add an extra layer of dynamism to JAMstack sites. They provide a way to inject dynamic content to sites and respond to user feedback in realtime. In the case of a forum where comments are an integral part of user interaction, comments can be implemented via a serverless function that reads and writes to an external database. This is in contrast to the traditional approach of building out a monolithic application to handle one or two pieces of dynamic functionality. Serverless functions therefore enable developers to add dynamism to their sites while also isolating tasks into functional elements that are more efficient (no need to over provision servers) and maintainable in the long run.
If serverless functions still confuse you, check out Tara's deep dive into what serverless is. And if you're not sure how to use serverless functions, here's a piece to get your creative juices flowing.