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’re planning to build your application on. For example, enable Linux Dedicated Server Build Support if you plan to build for Linux.