What is the difference between DICOM Query/Retrieve and DMWL Query?

And what determines the difference? SOP Class?

When asking questions on this forum, you are invited to make complete sentences in the body of your post.

“What is the difference between DICOM Query/Retrieve and DMWL Query?” => This is explained in the Orthanc Book:
https://book.orthanc-server.com/dicom-guide.html#dicom-network-protocol
https://book.orthanc-server.com/faq/worklist.html
https://book.orthanc-server.com/plugins/worklists-plugin.html

“And what determines the difference? SOP Class?” => C-FIND queries related to worklists are identified by the “1.2.840.10008.5.1.4.31” SOP class UID:

https://www.dicomlibrary.com/dicom/sop/