I don’t like this kind of statistics, and the posted question also didn’t convince me of a possible claim people applying statsitical test actually know what they do.
I did neither regard the “non-parametric” nor the “p-value” thing.
That “the distributions are different”, I would assume anyway.
To program a function returning the U-value and the z-value (where applicable following the linked advice) was rather simple.
Errors should be expected nonetheless - as well in my code or formulas, as in guides concerning statistical tests.
If somebody wants to actually apply the code included with the attachment, thorough considerations and checks are indispensable.
You may study the attached example. mann_whitney_U_test.ods