The difference is:
Tie line: A tie line is an arc that curves upward or downward. Its function is to connect two or more voices with the same pitch. The notes are connected together and when sung or played as a single note, its length is equal to the sum of all those notes. In monophonic music, slurs are always written in the opposite direction to the stems. ?
The "legato line" represents the playing method, which can connect several notes of different pitches together. The "legato line" is expressed as: On the piano, it is the legato playing method, which means this Several notes must be played coherently and smoothly
The former is just the same note, but the latter is not.