I think some type of insect larvae.. given the appearance of eyes at one end. NOT planaria, they don't look anything like this.
Check mosquito larva. If they swim with squiggly little s shapes, writhing its body that is likely what it is, and fish usually like to eat them. My Tetras love them. It might be a dragonfly damsel, you can check that but the head doesn't seem big enough.