How I use commas in poetry and how I use them in prose are two different things. :)
In poetry, punctuation has to be taken with some poetic license. And, at least with mine, it serves the function of adding a pause. So a comma is a softer pause than a semi-colon, which is a softer pause than a period, which is a softer pause than a line break, or a stanza break, and so on.
With more formal English, however, I will refer you to my source, the amazing Mignon Fogarty (aka Grammar Girl), since she covers more of the nuances much more clearly than I can.
https://www.quickanddirtytips.com/education/grammar/where-do-i-use-commas