You must meet the following requirements to use the Dedicated Server build target.
Download and install Unity Editor version 2021.3 LTS or later.
Install the Dedicated Server module for the platform you want to build your application on. For example, enable Linux Dedicated Server Build Support if you want to build for Linux. For more information on adding modules in the Unity Editor, refer to the Unity Hub documentation on adding modules.