Sounds like you installed a core edition. You can try the PowerShell below
dism /online /enable-feature /featurename:server-gui-mgmt /featurename:server-gui-shell /featurename:servercore-fullserver
but this function was wrought with problems and abandoned 2016 and higher. The simplest solution may be to clean install it but choose one of the Server with a GUI options.
--please don't forget to upvote
and Accept as answer
if the reply is helpful--