Your plant has already bolted hard. Once that happens, the taste of the leaves becomes bitter and far more unpleasant.
If you just want a few basil leaves on occasion as a garnish, you should probably let the plant keep doing its thing. If you want good-tasting basil in volume, replant.