Serverless/Lambda is a deploy option, not an alternative to writing code. Take Laravel, for example - a popular framework that traditionally is deployed to servers, virtual or otherwise. Well not long ago, they released Laravel Vapor (https://vapor.laravel.com/), a deployment platform for your Laravel code. It takes some configuration, but you can generally take your Laravel app and run it on Lambda using Vapor super easily.
But you still gotta write that app.