The OWL program at Purdue has some excellent instructional guides, among them this guide to APA explaining and showing examples for formating a research paper and citation styles.
Whether or not you can use ChatGPT for an assignment is up to the professor, but if you are able to use it, you need to cite it properly. This article from the APA Style Blog shows you just how to do that.
This handout covers American Sociological Association (ASA) style and includes information about manuscript formatting, in-text citations, and formatting the references page. The bibliographical format described here is taken from American Sociological Association (ASA) Style Guide, 5th edition.