Why do the radii of white dwarfs decrease with increasing mass, and the radii of the terrestrial planets increase?

An increase in the mass of white dwarfs entails an increase in the density of matter and, accordingly, a decrease in size. The existence of a solid planet as a whole is determined not by the force of attraction, but by the force of intermolecular interaction of matter. The density of solid planets in a first approximation does not depend on their masses. Therefore, a more massive planet is also larger.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.