If you don't mind using expressions, you can achieve this with geometry generator (for visualization purpose only) or with Menu Processing / Toolbox / Geometry by expression (if you want to create a new layer with the nearest points on the line). In both cases, the expression remains the same.
Let's suppose you have the same setting as on the screenshot below: a red line (layer named line) and the red points. To demonstrate it with geometry generator: On the points layer, you add a symbol layer (click the green + symbol), than set it to Geometry generator, as Geometry type select points and paste the following expression. It generates the blue points on the screenshot (I added the black lines connecting red and corresponding nearest blue point on the line for easier identification only):
closest_point (
geometry (
get_feature_by_id (
'line' , 1
)
) ,
$geometry
)
