Firstly, this problem can be hidden in the high beam relay malfunction. Probably it's out of order. Secondly, there may be a malfunction in the light switch itself. Third, the problem may be that the headlights are not connected properly when they are installed. If the headlights are old, then a reasonable solution is to reinstall the front headlight or replace individual elements. In any case, it is recommended to contact a professional car electrician.