If a frame is a little bit too big you will never get a comfy bike position. If it's a little bit too small you can play around with various adjustments, stems etc. If as in my case once, you buy a bike where the frame is definitely too small there is only one option.
Change it!
Usually when I change bikes though, I know the required frame size already, I know the dimension from the seat nose to the bars, change the stem length to suit, put a couple of spanners in my pocket and ride the bike and make minor adjustments. In other words I copy all the dimensions from my comfy riding position and transfer them to the new bike.
Please note that those final adjustments may be very small. On my last new bike I was still suffering from some very minor numbness and a fractional adjustment to the saddle cured it