If you buy a cane that is too tall for you it can easily be shortened,
keeping in mind that canes cannot be lengthened, so be sure to measure and cut carefully. You can also avoid the problem entirely — some makers, such as DaiWalk, cut the shaft to your measurement before shipping.

To measure your cane:

Put on the usual walking shoes.
Stand naturally upright as possible.
Let the arms fall to the sides naturally with a normal bend at the elbow.
Turn the cane upside down and place the handle on the floor.
Have a second person mark the shaft of the cane at the bottom crease of the wrist.
To cut a cane:

Most canes come with a rubber tip. Remove the rubber tip by gently twisting it until it comes off. Cut the cane where the mark was made and replace rubber tip. If you do not have tools to cut the cane local hardware stores will often cut it for you. Check with them, as some do it for free and others charge only a nominal fee.

Source: How to measure for a walking cane — DaiWalk
https://daiwalk.com/pages/how-to-measure-for-a-walking-cane