Can a spell such as fireball go past its 20-foot radius if the point of origin is set in an enclosed space that’s less than 40 feet across?

The fire of the fireball spell can spread around corners, but it’s limited by the spell’s 20- foot radius. It doesn’t extend farther than 20 feet from the point of origin no matter where it is cast.