Hide out of stock from collection sort by size

Please I need your help I made groups divided according to size, for example 0-3 months and 3-6 months, and I need to hide the products whose inventory for size 0-3 months is zero when displaying a collection of 0-3 So that the customer only shows the available products And the same in collection 3-6 months As the current situation .. it displays all products of size 0-3 even if its stock is zero, because the stock of the total product for all sizes is not zero, but the stock of size 3-6 may be equal to 2 Therefore, the condition that the offered stock is greater than zero does not work for me What is the solution please

This photo from 0-3 months collection

you can see products must not be shown here

.. because i want the customer see 0 - 3 available stock only

Hi Mohamed

Hope you are doing well!

This is Vidhi from Inextrix Technologies we can help you with the requirements you have posted please provide us your contact details so that we can get back to you for more details.

Regards

Vidhi Soni