As always there are different ways to do this. You can go online and do a search on shed doors or something like that and see what they recommend, some have pretty detailed instructions. Mine don’t look exactly like what they show but the principles are the same.
You are obviously thinking of triangles, which is good. I don’t know how you are doing it but there is a real good chance that angle will not be exactly a 45. Mine never are. To me, it helps to think which diagonal is in tension, which is in compression. The diagonal running from the top hinge side to the outside bottom corner is in tension, you could use a cable and turnbuckle for this if you can figure out how to connect it. A relatively small piece of wood can work. In tension it doesn’t take much.
The top outside corner back to the lower hinge is in compression. This takes more. Think of a piece of notebook paper. If you pull on it, tension, it’s pretty strong. If you push on it, compression, it easily crumples and folds. Not much strength there.
I build the door frame first so I know what I’m working with. I’m a rough carpenter, certainly not a fine cabinetmaker that can precisely control angles and lengths. My corners may not always be perfectly square or sides exactly parallel, especially when I’m trying to fit something into a pre-existing building that may not be perfectly square to begin with.
I believe in substantial hardware too. My hinges are going to be oversized. I expect them to be able to take rough treatment.
When I start building a door I lay out the two horizontals the hinges will attach to, usually 1x4’s so they are wide enough so the hinges fit. I use plywood to form the door face though you can use 1x3’s or 1x4’s. The plywood gives you those stress lines in tension to help keep the door from sagging but plenty of people use boards. I screw them together. (I use boards for garden gates.) I use 3/8” plywood to keep the door a little lighter. ½” works too.
One problem I have with plywood is that I can’t see the board I’m screwing into. So I put the plywood on bottom, fit the boards, and screw long screws through the ends. When I turn it over, I draw a line between the screws to show where to put the shorter screws that don’t poke all the way through. Then I remove the long screws. So far, pretty easy.
Now comes the hard part. I cut a piece, probably 1x3 or 1x4, to go from the bottom of the top outside corner of that horizontal to the top of the hinge side of the bottom horizontal. This is the compression brace and needs to fit kind of tight, especially if you are using boards instead of plywood. The cut can be tricky as it is never exactly 45, sometimes not very close. I mark one cut and cut it. Then I fit that in, maybe sanding some to correct the fit, then mark the other cut. I may use the sander again to make that fit. The objective since it is in compression is that the diagonal firmly contacts the underside of the top horizontal and the top side of the bottom horizontal to keep it from sagging. Then I screw these on.
Next I attach two pieces of wood to form the tension line, from the top hinge corner to the diagonal, then from the other side of the diagonal on down to the bottom horizontal. Since these are in tension they don’t have to butt against the diagonal and the horizontals, they will pull away anyway. You probably don’t need this anyway, especially with plywood, but I use them to help stiffen the plywood so it doesn’t warp.
Next I attach the hinges to the door. I use nuts and bolts but I’m just going through plywood and the horizontal. Then I fit the door (can be challenging to hold it into place) and attach the hinges to the door frame, using long screws. This is something that can get you, you need to have something substantial in the door frame to screw the hinges into.
Then attach your lock and you are ready to go. I use a hasp on the outside so I can lock it against predators and a hook on the inside so I can lock it behind me when I go in to keep the chickens in. Whatever lock you use on the outside, make sure it cannot accidentally lock you inside. That could be embarrassing.
If you use plywood, it can wave because it is so thin. But if you use a lot of screws to attach it to the horizontals and diagonals, you stiffen it tremendously. You want that door stiff enough to act as one