Tail biting is so frustrating!
The most common cause is stress, so you can try different things to de-stress him. If he can see other bettas, his reflection, something outside of his tank that is brightly colored, etc., then move things around so he can't see it anymore. You can try covering his tank in towels and keeping the lights low to see if this helps. You also might want to baffle your filter if it isn't baffled already, sometimes the current stresses them.
Tailbiting can also be caused by boredom. If you try to remove potential stressers and he's still biting, rearrange his tank and see if it helps. Sometimes having "new" spaces to explore helps a bored betta. You can also try holding a mirror up for him to flare at.
Tailbiting is so tricky because the common causes...boredom and stress...are essentially opposites, so there's kind of a catch 22. But all you can really do is try different things and see if any of it helps.
Unfortunately some fish are just chronic tail biters. I tried EVERYTHING to get my copper HM to stop, but he still does. Any time there is new growth he bites it all off. Since nothing has gotten him to stop, I have begrudgingly accepted that he is going to do it, and I just try to focus on preventing secondary infection/fin rot by maintaining good water quality. I recommend tannins from IAL or fallen oak leaves if you have access to either. The tannins darken the water, which helps reduce stress, and they also promote regrowth and healing. Even if your fish doesn't stop, the tannins (in conjunction with frequent water changes) will help him stay healthy and infection free. Hopefully you are able to get your guy to stop though!