This was shared in a note on the Apple Support page. It states that development and support for macOS Server will officially be discontinued starting April 21, 2022.
As of April 21, 2022, Apple has discontinued macOS Server. Existing macOS Server customers can continue to download and use the app with macOS Monterey.
Apple has been gradually removing features in macOS Server over the past few years.
Given that some of the features in macOS Server are already provided as built-in features in macOS High Sierra or later. Some examples are the Caching Server, File Sharing Server and Time Machine Server features.
Still from the Apple Support page, Apple also explains several features in macOS Server that can be replaced or become alternatives if macOS Server users want to switch to these features.
The last version of this operating system before it was discontinued by Apple was codenamed macOS Server 5.12.2.
Users of the latest macOS Server can still use this operating system and download macOS Monterey. Apple also has support documents for migrating from the Profile Manager system on macOS Server to other MDM services.