Try something like this in the field calculator in the lines layer
array_to_string(
overlay_intersects(
'layer',
"type"
),
','
)
Replace layer
with the layer name / id of the point layer.
Use this to return the data ordered by the position of the point in the line:
aggregate(
layer:='Points layer name/id', -- set here the points layer name/id
aggregate:='concatenate',
expression:=to_string("type"), -- set here the field to be concatenated from points
filter:=intersects(
$geometry,
geometry(@parent)
),
order_by:=array_filter(
array_foreach(
generate_series(
1,
num_points(geometry(@parent))
),
array(
@element,
point_n(
geometry(@parent),
@element
)
)
),
intersects(
$geometry,
@element[1]
)
)[0][0],
concatenator:=',' -- set here the concatenator
)
Result, red tags are the concatenated fields from points.