MengerMesh
MengerMesh[n] gives a mesh region representing the nth-step Menger sponge.
MengerMesh[n,d] gives the nth-step Menger sponge in dimension d.
Please visit the official Wolfram Language Reference for more details and examples on core symbols.