DC cannot flow through a capacitor because of the way a capacitor functions. A capacitor is essentially two conductive plates separated by an insulating material called the dielectric. When a DC voltage is applied across the capacitor, an electric field builds up between the plates, causing charges to accumulate on the plates. This creates a separation of charges and an electric field that opposes the further flow of charge.
In a DC circuit, once the capacitor is fully charged, it behaves like an open circuit because the current stops flowing once the voltage across the capacitor equals the applied voltage. In other words, a capacitor initially allows current to flow as it charges up, but once it reaches its maximum charge, it blocks further DC current flow. This is why capacitors are often used in circuits for filtering, coupling, and decoupling AC signals, where they allow AC to pass while blocking DC.