AI shouldn't be used in place of critical thinking and analysis. Depending on it's use, generative AI fills the same role as background research or sites like Wikipedia -- useful for exploring and understanding a topic, but not something you cite in a paper or project.
For instances when the use of AI tools like ChatGPT is required within your assignments, it needs to be cited, just as you would cite any other information that is not your own. Not citing the use of AI may be considered plagiarism. This article explains how to use and cite AI ethically and responsibly.
This article from style.mla.org explains how to cite the use of AI "whenever you paraphrase, quote, or incorporate into your own work any content (whether text, image, data, or other) that was created by it."
This article from apastyle.apa.org explains how to cite the use of ChatGPT in your assignments.