Good for you to attempt new skills. Mitering accurately is like level 2 in woodworking, some may say even higher, but it ain't you basic cut. You'll notice I said accurately.
Here's why it's not so easy. First you would set your miter saw or table saw over to 45 degrees. The miter saw has a limited width of cut, so more than likely for your project you will use the table saw.
Next the miter gauge must be dead on at 90 degrees to the miter slot. A quick test it to slide it out until there is a tiny gap of open space between the gauge and the table top. If the gap is parallel, you're all set.
Next, the blade must be dead on at 45 degrees so use a draftsman's triangle or a digital angle box to get that. If it's not 45* exactly, the joints will show gap either on the outside or the inside where they meet.
Next, in order to get the piece equal length, you'll need a stop to bump them against to make multiple cuts of the same length. Clamps a block on the table top or spaced out AWAY from the fence by at least 1 ". to allow room for the piece to fall away. DO NOT use the fence in combination with the miter gauge. Use one or the other.
(OK, I have done it many times, but my machines are set up accurately and I know what I am doing after 50 years of tablesaw operation)
What I do is have a long fence extension on my miter gauge so it pushes both the workpiece and thew cutoff at the same time. It also is long enough to clamp a stop block right on the fence.
Never reach around or over a spinning saw blade. Shut the saw off and wait for the blade to stop completely before moving anything near the blade.
Next, select your table saw blade for crosscutting, either 40 teeth or more. Rip all your pieces to the desired width before making any crosscuts.