Can I add a Bloom effect on a line 2D?

The best way to do this would indeed be to use shaders. You don’t have to write your own. There are two demo projects in the official repo containing shaders. You should check them out:

You can also look for stuff here: https://godotshaders.com/

And I shouldn’t forget our resident shader proffesor: Godot 4 shaders - a list of video tutorials