The tight sandstone gas in the Xujiahe Formation of the Sichuan Basin offers substantial resources and strong exploration potential. However, identifying desirable reservoirs proves difficult due to factors such as low porosity and permeability, high heterogeneity, and the complex layering of sand bodies. To pinpoint the main factors influencing optimal zones in the tight sandstone reservoir of the fourth member, we systematically analyzed its petrology, physical properties, pore structure, and diagenesis. Our analysis shows that the primary rock type in the target layer is feldspar lithic sandstone, which has generally poor physical properties. The average porosity measures 6.62%, and the average permeability is 0.1495 × 10−3 m, categorizing it as an ultralow porosity and ultralow permeability reservoir. The lower limit of porosity is 6% and the lower limit of permeability is 0.1 × 10−3 m2. We classify the reservoir into two types based on a porosity threshold of 8% and a permeability threshold of 0.3 × 10−3 m. Type I reservoirs show relatively good physical properties, with their reservoir space mainly comprising large pores and high fluid mobility. Reservoir quality depends on both sedimentation and diagenesis, and the physical properties of delta front sand bodies exceed those of delta plain sand bodies. Compaction primarily affects reservoir density, followed by calcite and illite cementation. Additionally, the chlorite rim effectively preserves pores. Secondary dissolution pores formed by feldspar dissolution significantly enhance reservoir space, improving overall reservoir quality.