Serverless function, explained
Static sites have no server of their own, so jobs that need secrets or a database have to run somewhere else. A function is often the simplest answer. It runs, responds and stops.
Typical jobs include handling a form, calling a paid API with a hidden key, saving a lead to a CRM or checking a referral code.
Vercel Functions, Netlify Functions and AWS Lambda are well-known options. Despite the name, servers still exist. You simply do not manage them, and you usually pay based on use, so check each host's pricing.
Functions have limits. They can start slowly after being idle, can only run for a set time and do not keep state between calls. Long jobs and persistent connections usually need another approach.



