Stakes will hold it up if you want to keep the plant as is. Can't think of any particular "trick" to make the stalks stand upright. You can use twisty ties, plant tape, strips of nylon tights... whatever's handy.
However, if you're willing to prune it, you'll have two outcomes: your plant will be shorter and fuller and you'll have cuttings to propagate.
Pruning into woody basil stems is tricky; sometimes it will resprout, sometimes it won't, and it will sprout more slowly indoors in the winter, but it's doable. If that were mine, I'd try clipping back just a couple stems to see if they produce new leaves.
Look for nodes that show some emerging growth and clip just above them the same way you'd normally pinch your plants in the summer. I can't clearly see in the photo, but I've circled what might be possible sites. If those cuts produce new growth, gradually clip back the whole plant, but not all at once. Make sure it always has healthy leaves on about a third of the stalks. BTW, it looks quite healthy for an indoor basil!
Then clip the woody parts off the leftover leafy cuttings (into the green stem) and root those in soil or water for new plants.
Going forward, keep the entire plant pinched back while the stems are green and it won't get so leggy.