The function of a salt bridge is
In galvanic cell if there is no salt bridge
Anode looses electrons and positive charge is accumulated.
Cathode gains electrons and negative charge is accumulated. Accumulation of charges prevents flow of electrons and cell reaction does not occur.
Salt bridge is present
Prevents accumulation of charges by flowing the ions of elctrolyte of saltbridge in opposite direction and fecilitates flow of electrons.