How can i set a line to be an exact measurement
Scenario 01
In Object mode just change Dimension. Than Apply Scale  Ctrl+A to bring scale factor to 1, then you can see edge length in edit mode as dimension. Think about Object as an universal container that can contains any data set. (If you go to Data Properties of selected object you can assign any data set to this object container.) By changing dimension you actually change just a scale factor for this container not data itself.

Scenario 02
In Edit mode you can select edge, press G move X along axis and type number like a math.
Let say if you have side 2 m and you want 1 m, type -+1.

Scenario 03
You can delete all vertices. Click with Ctrl (create vertex), press E Extrude along X axis and type number of specific distance. Than same for edge to extrude second dimension.