Edit slider number precisely

If you go into ardour and click the mixer buttion there are those volume sliders and above that is the number it is set at. How do I edit that number without moving the slider aka just entering something like -20 and having it set to exactly that?

Just click into that box and type? See Gain & Meter section here:
https://manual.ardour.org/ardours-interface/audio-midi-mixer-strips/

I don’t see anywhere in there where it says how to enter a number precisely.

I click in the box but then the red highlighted line showing I selected it disapears.

From the page I linked:

The big Gain slider on the left allows to change the gain of the track. Its default OdB value is reminded with a white horizontal line, and its precise value is shown in a text field above it, that doubles as a way to type in a numeric value.

I don’t know what OS and ardour version you are using, but I do know that on linux, depending on desktop environment, themeing etc., the cursor and text color may do weird things. Here on KDE/Plasma with dark Breeze color scheme it sort of misbehaves, the red blinking cursor appears shortly after a click, then disappears, and reappears after a second click, and the box doesn’t highlight the text when I try to select parts of or the whole numerical value. But I always can manage to type text in there when the cursor shows.

I found the fix. You hold alt down and click on the number in the box twice and it works perfectly.