Product Backlog items are ordered based on their value which is assumed to be the same as the Product Owner's need. It depends on the project and Scrum doesn't provide a system for determining value; it's all up to the Product Owner. Product
Backlog items are supposed to be non-technical and independent; so, there would be no dependency in the way of ordering. Both risk and complexity can influence the business value but they are not considered directly for ordering the
items.