Creating responsive 3 x 3 gallery box

Hello I am trying to create a flex grid which has 3 by 3 image gallery which is responsive,

Currently this is going on a wordpress page and this is the code to my image using openseadragon.
So I need this image:

<div id="materials-0158" class="suarrmaterials-zoomable-image" style="height:460px; width:310px;" data-image="2020/05/DSC_0158-1.jpg"></div>

to appear three times next to each other and three on the bottom, I will update the images and add more image boxes once i get the correct…

Creating responsive 3 x 3 gallery box