GameObject instances pass by inspector or use programming

It is better to pass instance from scene to inspector or grab/find isntance directly by programming ?

What the advantages versus the other way ?

That certainly depends on your game. For example, if you search an enemy that may despawn and spawn at runtime, you should search by code.
But I think you mean static, always present objects. There are not many advantages and/or disadvantges, other than you possibly loose the reference between them. I would still search by code, this is more secure and not much effort. Can’t help you with exact pros and cons though…