I just wanted to add another solution in case
- the intervals are not intended to be equal,
- the interval 'names' are not necessarily sequential
- the intervals are represented by line geometries, and
- you intend to manipulate the intervals by shifting line geometries around
which was my first interpretation of your question before I saw Babel had answered it and it was accepted.
If the above apply, a hard-coded fixed distance and/or sequence wouldn't be appropriate. I will leave this answer here in case a future question comes up with similar parameters...
Requirements
Assume the following:
interval_lines is the name of your interval lines layer - change as needed in expression
"lineid" is the field in that layer containing the relevant ID you want to label your points with - change as needed in expression
- You want the points to take on the
lineid of the closest line to the LEFT of the point.
- IMPORTANT: All interval lines must be in the same orientation and the orientation must be south heading to north, or west heading to east. Please use an arrow symbology or similar to visualise the direction of your interval lines. — You can fix the direction of errant lines by selecting them and then using 'Reverse line direction' tool under Processing Toolbox with Edit Features In-Place selected
Expression
Use the following very convoluted expression in your label field (automatically updates), or as a Virtual Field using Field Calculator (also automatically updates).
with_variable('closest_line_array', --generate CLA - lineid array of closest lines within X map units (result e.g. ['A','B','C'])
overlay_nearest('interval_lines',
"lineid",
limit:=-1,
max_distance:=500), --adjust X map units here
array_get(@closest_line_array,
array_find(
array_foreach(@closest_line_array, --for EACH element in CLA ...
if(with_variable('closest_line', --1. define CL = geometry of closest line
geometry(get_feature('interval_lines', 'lineid', @element)),
with_variable('closest_point', --2. define CP = geometry of point on closest line
closest_point(@closest_line, $geometry),
azimuth(@closest_point, $geometry) - --3. calculate azimuth of CP to your point, MINUS ...
azimuth(line_interpolate_point(@closest_line, --4. calculate azimuth of line segment on CL
line_locate_point(@closest_line,
@closest_point) * 1.01),
@closest_point)))
>0, 'Right', 'Left' --5. determine if the CLA element is RIGHT or LEFT of your point (e.g. ['Right','Left','Right'])
)
), 'Left'
) --use array_find() to find the position of the first LEFT element (e.g. 1 - for the second element as above)
) --use array_get() to return the lineid corresponding to the position of the first LEFT element (i.e. 'B')
)
Example results
Static:

Dynamic:
- labels update instantly when interval lines are moved.
- note interval lines are all oriented in the same direction and and go from south to north
- label adopts attribute of line to LEFT even if there is no line to the right initially (although I presume this is not necessarily your desired outcome).
- lines are single segments only

Dynamic - west to east
- interval lines all oriented west to east
- points adopt attribute of closest line to top (which is left, based on arrow pointing orientation of line)

Left/right determination method adapted from SQL answer by dmitry.v.kiselev.
make_line($geometry,closest_point(overlay_nearest('Transect',$geometry)[0],$geometry))– she_weeds Apr 05 '23 at 10:46