UnityEngine.UI is indeed a valid Unity namespace https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.UI.html and it's a built-in package in Unity, Maybe you have it disabled in the package manager? (Window->Package Manager ->Select Package: Built-in -> Search for the package named "UI") It's strange since it's also supposed to be a dependency of the Input System package. Either way the UI elements are not really supposed to be used as-is, it's mostly an implementation example so you could just remove those files either way and use your own UI.
And the reason the type "Slider" is not recognized is most probably because you don't have the UI package not because I don't know how to type (Errors like that are usually caused by how your project is setup since Unity has a lot of package that can be enabled or disabled)