The answer is to use the findChildren() method.
Assuming your GUI is in a class object which is typical for GUI
You can call self.findChildren(QObject) where QObject in this case would be the type of object you are looking for.
If you are looking for QSpinBox objects then you would call self.findChildren(QSpinBox). This returns a generator object that you would then loop over.
Next - How do we get the object names now that we have the objects?
children = self.findChildren(QSpinBox)
for child in children:
print(child.objectName())
What we are now doing is accessing each object "child" with method objectName() which will return the name set in QtDesigner such as spinBox_1, spinBox_2, etc.
This can then be extended to get our values, child.value() for example.
See also: https://doc.qt.io/qt-5/qobject.html#findChildren