I want to extract the Z coordinates from the line nodes. The data is there in the vector editor.
If you are interested in the z-coordinate of each point, you should convert the line into points. You can use for example the "Extract Nodes" tool in QGIS for this task. After that open the Field Calculator for the point layer, paste
z($geometry) like in the image below and write the result in a field in the attribute table.