A young man has been charged after he allegedly made a “threatening gesture” outside a Sydney synagogue.