How can I rotate a cylinder so the top points at specific transform?

I have a GameObject with a LineRenderer that has a single line drawn, on which I’d like to place cylinders so the top of the cylinder points to each end of the straight line that the cylinder sits on, like a cylindrical bead on a straight piece of string. The cylinder is a child of the GameObject which the LineRenderer is sat on. The LineRenderer GameObject is not rotated itself, and the Line drawn could be any angle relative to the GameObject, and it would be a bit of a hassle to refactor so that the Line is always vertical and instead rotate the LR GameObject, and it seems this should be an easily solvable problem! I’m attempting to use either LookRotation or LookAt on the cylinder but for whatever reason all permutations I can think of simply are not working. THanks for any advice!