This question seems to come up a lot when people first start knitting mitered square blankets and a wonky square can cause a great deal of consternation if you are new to process.
By wonky, I mean a square that looks to be a little more diamond shaped than the nice, neat mitered square of fond imagination.
The simple solution is often the best one in knitting (and life) - just keep going. The first square often looks a bit weird but it gains structure and support from adjoining squares.
If that's not a metaphor for life I don't know what is. If in doubt just keep going and draw on those around you for support.
Seriously though, it's easy to give up at the first attempt, or to repeatedly try to produce a perfect square to start off what's going to be your wonderful magnus opus. But, even if the square looks a little lopsided it's generally best to just keep going.
As you are knitting garter stitch there will inevitably be some stretch and ‘give’ in your knitted piece and this will become more pronounced, the fewer stitches you have on the needles. Once you start to add squares on either side then stability will return and the stitches on either side will help to pull the recalcitrant square into shape.
If the problem is that you aren't happy with the fabric- too loose or too rigid, then obviously readjust your needle size and start again. But if it's just an issue of geometry, keep going and all will be well.
Other mitered square articles you might find helpful:
How much yarn do you need for a mitered square
How to knit a mitered square blanket