A visual guide from Purdue Owl is presented below in the form of a flow chart for better clarity while citing the works.
Adapted from: “Should I Cite This?” Poster. Purdue University. Reprinted From: https://owl.purdue.edu/owl/avoiding_plagiarism/should_i_cite_this_poster.html. Copyright ©2021 by The Writing Lab & The OWL at Purdue and Purdue University