Detritus worms may become a nuisance if they are overpopulated in your aquarium. This happens when you don't clean your tank regularly. As detritus worms multiply, their food and oxygen sources are reduced. This causes them to climb up the tank toward the water's surface.
Planaria are small. Very small. Measuring around 0.1 to 0.6 inches, so they are easy to miss. In fact, you likely won't notice them at all unless they grow in number or bravely slide their way over your aquarium glass.
I've not noticed any moving. They all seem to be at the top above the water level. We came back from holiday and noticed our water had huge nitrate and nitrite spike and unfortunately lost one fish. I've since cleaned the tank and done around 75 percent water change and its still a bit high but looking better these only appeared today and I water changed yesterday is that normal. I cleaned the filter out yesterday too as that is seeming to block up after a day or 2
Those worms seem to be above the water line. If that's the case then they are probably maggots of some kind, at least where I live, there are fly species that love to lay eggs in high-humidity environments and as such end up doing it in people's aquariums sometimes, and those in the pictures look like them. they are quite harmless and in fact some fish love to eat them.