Every year my basil gets a little wild by the end of summer. It gets tall, starts flowering, and suddenly I have way more than I know what to do with.
One of my favorite things to do with it is take a few cuttings and root them in water. It is almost too easy. Snip a stem, stick it in a jar, and a little while later you have roots.

When I move them to soil
I usually wait until the roots are a few inches long and starting to branch before potting them up. Once they are in soil, I water them well and keep the soil a little more consistently moist at first while they adjust.
You can also leave them in water for a while if you are not in a hurry. Eventually they will want actual nutrients and more space, but I am very much a “get to it when I get to it” gardener, and basil is pretty forgiving.
What if your basil is flowering?
Mine usually is by the time I finally remember to do this. I just take the healthiest, leafiest stems I can find and pinch off any flower spikes from the cuttings so the plant can put more energy into making roots and leaves.
Basically: do not overthink it
This is very much my kind of gardening. A little scrappy, very low effort, and mostly just using what I already have. A few snips and a jar of water can turn one tired end-of-summer basil plant into a whole new round of basil.
And if you want to go down a completely different basil rabbit hole, you can also read about the abundant magic of basil. I love learning about the folklore and magical associations behind the plants I am already growing and cooking with.