Remember to check with your instructor. Some instructors might not allow any use of ChatGPT and others might allow only limited use.
If you are allowed to use ChatGPT in an academic assignment, here are some guidelines for citing.
Your instructor may also ask for an appendix that includes the prompts that you provided to ChatGPT or the full transcript of your interaction.
For guidelines on citing other formats of generative AI (images, code, videos, etc), see How to Cite AI Tools: A Guide for Students.
See also this summary of ways to acknowledge use of generative AI: Acknowledging and Citing Generative AI in Academic Work.