The first thing you must understand is Server is dead.
Server.app's last release supports Monterey. There will not be a Server.app released for Ventura. About macOS Server 5.7.1 and later - Apple Support. Even on Monterey, the final version of Server.app had two visible services: Profile Manager (now replaced with Apple Business Essentials) and Open Directory (not really needed since Profile Manager and Xsan are gone). Sure, if you were crafty enough, you could still setup DHCP, NFS, and Xsan. But face the reality. These services are better served elsewhere (DHCP should be on your networking hardware), likely have better alternatives (while Apple's SMB leaves much to be desired, it is likely still a better choice than NFS and cloud storage solutions are, for most environments, a better option than traditional file services, especially with a distributed workforce), and Xsan will continue as a client for StorNext environments but trying to build an Xsan controller using Mac hardware is now an exercise for the mad.
Now, you mention L2TP and AFP and TimeMachine in your question above. Any VPN service should be driven by your firewall at this time. Relying on port forwards to reach an internal server is not the way to go. And L2TP is a VPN service you should be looking to move away from.
AFP is gone. AFP Server was removed completely in Big Sur and under Catalina you could only use it on none APFS volumes. Sadly, file services on macOS is SMB or bust, and SMB remains inferior to AFP, even in its long deprecated state. And TimeMachine, while we all loved it a decade and a half ago, is a technology of the past. TimeMachine has one main flaw and that is that the backup is near your production data. Look at cloud backup solutions like BackBlaze or others as a replacement of TimeMachine. This ensures geographic distance between your live data and your backup data. If your fleet is like most, you have a lot of laptops. Think it through. If you have a Mac server running TimeMachine, then you must be onsite to backup. In this world of work-from-home, that means days (weeks) may go by without a backup. Move to cloud backup and remove the limits of proximity and the inconsistencies of the person.
Now, all that being said, if you want to host a Mac server, it can be done. The Mac mini is a very capable server and has played that roll since the Xserve was discontinued. There is not much more that the Xserve did that a Mini with a Raid array can not match. (ok, there are fewer services on modern macOS and the Xserve used like 10x the power...) And if you are looking for racking solutions, there are plenty. My favorites are from M1 Manufacturing (https://www.mk1manufacturing.com/cart.php) - 8 Mac minis in a 5U space! - but Sonnet and others have them also. Kits are available to Mac minis, Trash Can Mac Pros, and Mac Studios.
And, while it would be foolish to the highest level, please be aware that Apple sells the Mac Pro in a rack mountable option. Buy Mac Pro Rack - Apple
There is nothing stopping you from using Apple hardware in your server room. But you really need to understand what services are available on macOS. Sure, you can do SMB file sharing. Sure you can enable TimeMachine. But are these the right solutions for your business? Your email should be in the cloud. Your web site should be hosted by a cloud provider. What is left at this time? If it is backup, that should be in the cloud. If it is file services, that too should be in the cloud. (granted, if you say you are a video production shop and you have a fleet of Red cameras and are shooting 8k, then the cloud is not for you... but for nearly every other workflow, the need for on premise servers falls every day).
Do I lament the passing of OS X Server/Server.app? Yes. Apple had amazing solutions and terrible marketing and outreach. Does anyone remember Podcast Server? Holy smoke was that an amazing product. How about NetBoot and network homes in EDU deployments? Amazing and effective. All of this is gone. Other solutions (often superior and simpler) and the sales drive to provide one-to-one device assignment has relegated these technologies to the past....