How to create raw images on scroll view and position the raw views in the middle with gaps dynamic ?

This just sounds like a lot of generic you-need-to-get-familiar-with-the-UI-system kinds of questions. You should do some deep dives on UI tutorials for Unity because nothing I can write in this little box can come close to a half dozen good tutorials, perhaps starting with the ones from Unity (see Learn above) and then moving onto perhaps some Brackeys or Ray Wenderlich tutorials. Those are all good sources.

Also, don’t confuse yourself with ExecuteInEditor. That’s not really going to be useful here.

From stuff I keep handy, here are some notes on UI Anchoring, Scaling, CanvasScaler, etc:

Enclosed is a simple example of a dynamic UI situation, which reads files off disk (in this case sprites) and presents as many UI items as are needed to show them all.

8494565–1130474–DynamicUIDemo.unitypackage (55.7 KB)