Why is my 4-week old having trouble making bowel movements, and what can I do?

Several issues . A 4 wk old is becomming more robust in its efforts and will often make a lot of noise pooping. Their main muscle for this action is the breathing muscle and will be until the flabby belly muscles mature. If the poo is soft and emptying is regular i would not be concerned. Breast babies can poo a smear/feed or once a week. Bottle babies are more regular. If the poo is hard extra water may help.
See a Pediatrician. A 4-week old who is normal but has trouble pooping, may just be learning how to relax down low in the pelvis, to let poop move down where it can be easily pushed out. Sometimes holding his feet and bending his knees up to near his tummy can help. If he seems weak/soft in the muscles, his eating has decreased, his tummy is bloating with air, or his poop is thicker than mustard, see a pediatrician.