i want to add the image sprite to the scroll view through code
Your prefab - put in Resources folder,
Content - consist in scroll view in childs
Resource.Load("YOUR_PREFAB", GameObject.Find("Content"));
If you got an undetermined number of player stats panels(player pic, name, score) then you should add a vertical layout group to your scroll rect(container for all those panel)(which will resize any newly parented panels to it according to the values you set). If you got a predetermined num of players(4 for example) just add 4 panels to your scroll rect. As for how to set the image, name, score etc just have a script on each panel to handle that