Liverpool beat Hoffenheim in the Champions League play-off first leg with Trent Alexander-Arnold scoring a fine free-kick.