A convex planar polygon (shapes with no corners poking inward, only outward, that can be drawn on the flat, 2 dimensional plane) can only have 4 right angles.
Polygons can also be drawn on non-planar surfaces, such as on a sphere. In the case of a sphere, it only takes 3 right angles to create a closed polygon. Picture the shape on the globe created by following the equator from Mexico to the prime meridian, then up to the north pole, then back down along the 90 degree West line of longitude. This is a three sided polygon with three right angles.
If drawing on a surface with positive curvature made a right angled polygon with fewer sides, then a negative curvature surface should allow for a right angled polygon with more than 4 sides. Below is an image of just that, taken from a YouTube video on the subject, "5-Sided Square - Numberphile" This is a 5 sided right angled polygon drawn onto a psuedo-sphere. This shape has constant negative curvature.
This was accomplished by allowing our plane to curve into 3 dimensions. It is plausible that a surface curving into a 4th or higher dimension, with negative curvature, may produce a 6 sided polygon with all right angles, but you could not draw it in our 3 dimensional universe. Someone smarter than I would have to see if it could be described mathematically in that higher dimension.
tl;dr : No, not in our 3 dimensional universe. Maybe in a higher dimension. You can create 3, 4, and 5 sided convex polygons with right angles here in our universe.
A Hexagon
A polygon with six or more sides, in which four of the angles are right angles and the other angles are not. These others are of any type - as required. It cannot be a pentagon because, if 4 angles are right angles, the fifth would be 180 degrees!
Any polygon can have at least one right angled - for example a right angled triangle. An example of an irregular polygon with only right angles is a rectangle.
Any polygon with 4 or more sides can have only two right angles.
regular polygon\
a polygon with six sides and six angles is called a hexagon
A six-sided polygon. It also has the special name hexagon.
A Hexagon
Angles
An irregular pentagon is a polygon that has five sides and two right angles. A regular polygon on the other hand does not have right angles.
..... and six interior angles.
hexagon.
A Hexagon
hexagon
a polygon with 5 sides and 2 right angles is a pentagon
A polygon with six or more sides, in which four of the angles are right angles and the other angles are not. These others are of any type - as required. It cannot be a pentagon because, if 4 angles are right angles, the fifth would be 180 degrees!
Any polygon can have at least one right angled - for example a right angled triangle. An example of an irregular polygon with only right angles is a rectangle.