I tried using the packing cubes we use for suitcase trips, but found it cumbersome to sort through a cube and do the zip & unzip all the time.
Just in case you need other alternatives, our solution was shelves. We divided our upper cabinets by installing one white coated metal closet-type shelf in each. In one cabinet, I put tee/polo shirts on top and jeans/shorts on bottom. They stay in place and are easy to see, easy to pull out.
The smaller items do need containing. I found see-through plastic boxes from the dollar store that fit perfectly on or below our installed shelves, the boxes with plastic clips at each end for easy opening and closing. I use a small box for underwear, larger one for shoes, larger thin one for office supplies, etc. Also easy to pull out what I need.
Smaller see-through soft plastic zipper containers fit into empty nooks next to the boxes for small collections of related things like grooming supplies, or camera cords, SD cards & chargers.