Hasbro secures all hair tails in their ponies with washers. They’re usually flat metal ones that are tiny and look like this:
They are sometimes made of pink plastic instead of metal, but I have found those are usually drenched in glue and hard to salvage. Unsurprisingly, the smaller the pony, the smaller the washer.
Why have I listed them as a supply? Because I use them to secure the pony tails that I make as well. They’re necessary: they give the pony tails a wide end that can’t be pulled out of the tail hole so you know the hair is secure. I usually just reuse the washers I’ve taken out of other ponies in mine, but there are many who prefer to get and use plastic washers instead. As long as they’re the same size and shape as the metal ones they’re replacing, that should go fine. I’ve never purchased any myself, but I would guess that hardware stores and/or websites are a good place to look.