Flow instabilities and viscous fingering limit access to available subsurface pore space for carbon storage. Foams provide a pathway to mitigate these shortcomings and enhance storage capacity in subsurface systems by shifting the flow dynamics toward a stable flow, improving residual gas trapping, and reducing gravity segregation. Foam systems require careful consideration of various factors including surfactant formulation and effective concentration to maximize foam stability. This work aims to optimize foam stability and carbon storage potential in the context of CCUS, by testing CO2-foams with different surfactant formulations and concentrations using a microfluidic platform. The microfluidic devices contain surrogate porous media that are representative of Berea sandstone and a Indiana limestone. The mediums are designed using X-ray tomography and porosity data from the core samples where pore connections are informed by throat size distribution data. The devices are fabricated utilizing an in-house photolithography method. Surfactants solutions are made using brine and three zwitterionic surfactant formulations with varying concentrations, ranging from below to above the critical micellar concentration (CMC). The solutions, along with CO2, are injected into the medium using a Surfactant Alternating Gas (SAG) scheme. Data is collected in the form of segmented high-resolution images of the medium during and after the injection process. Foam stability is evaluated based on changes in foam texture over time and bubble-size populations. The potential for carbon storage is evaluated based on residual fraction of trapped gas in the pore structure. Optimal surfactant formulation and concentration are identified for achieving a stable CO2 foam, a higher CO2residual saturation in the pore space for the lowest total cost.