How to edit main page grid

The index page grid is built using only flex grid. The images loaded are based on 3 type of sizes.
The size of the images used are:
- 375px x 375px
- 375px x 555px
- 810px x 810px
The grid is made of 3 wrappers and the code looks like below:
<div class="first-wrapper">
<div class="col-wrapper-img">
....
</div>
</div>
<div class="second-wrapper">
<div class="col-wrapper-img">
....
</div>
</div>
<div class="big-wrapper">
<div class="col-wrapper-img">
....
</div>
</div>
This grid can always be replaced with the masonry grid from shop.html page