Two terms that answer different questions
Why learning from data and generating content describe overlapping categories rather than interchangeable terms or competing alternatives. · foundational
Machine learning (ML) describes learning patterns from data rather than relying only on hand-written rules. It answers a question about how a model gains its capabilities. A model can learn from past emails to recognize unwanted messages, for example.
Generative AI describes a capability: producing content such as text, images, audio, or code. It answers a question about what a model can produce. Modern generative AI learns patterns from data, so it also belongs to machine learning.
The terms are therefore overlapping, not interchangeable. Calling a model machine learning does not tell you that it generates content. Calling it generative AI does not mean it uses an alternative to learning from data.