What kind of activities stimulate gray matter in the brain? What about white matter?

Life and effort. There is no actual need for costly and elaborate programs to improve brain capacity (presuming non-disease state). Pay attention to what is around you. Think about it. Analyze it. Dig through the endless resources of the internet. Challenge yourself with new ideas and examine your beliefs. Have intelligent conversations. Intentionally vary your activity. Get physical exercise. Live fully!