You have the grid display set to ‘Aspect Ratio’. Change it to square.
This is only a visual representation of the photos. As they have carrying aspect ratios, they cannot display fully in a grid format without spaces (your ‘black bars’)
These bars are not part of the photo, merely the only way to display all of a rectangle within a square space.
The photos themselves are fine.