Salah was on Liverpools side when Alisson kicked the ball, offside can be when the receiving player is on the other teams half and if the other team doesn't have atleast 2 player behind him but yeah you can read the rules from E. Sommer's comment

Only top voted, non community-wiki answers of a minimum length are eligible