Your prints can be the sizes below assuming the image will print successfully at any of the given dimensions.
There will be border around the print and not printed edge to edge.
It doesn’t matter if your print is square, just as long as the longest side fits within the measurements minus a border of around 15mm on each edge unless a larger one is wanted.
As a general guide in pixels at 300dpi for a good print then:-
But I would advise if thought your image wouldn’t print well at the size chosen.
Your image can of course be printed smaller than these pixel sizes but not bigger.