>>1668368>>1668371that's part of the brake lever that stops the outer cable there. So just the inner cable is pulled through and it actuates the brake.
You could replace it with either of pic related, which are generic parts. A ferrule, or a barrell adjuster. Both would just sit against the brake lever, so they'd rattle and add a tiny bit of sponginess, but they'd do the job. (the ferrule might be too small and pull through)
Actually replacing the cable stop with the right thing that fits snug on the lever will be hard.
The other issue is the plastic sheathing from the outer cable has stripped back and the cable is probably pretty old.
The best option really is just straight up replacing the brake lever with a better one with a spring in it and recabling.
But yeah, the barrell adjuster part on the left, is like $1, that's the generic part, that will fix it.
If you have a local community type shop that deals in second hand bike parts you might find a bin to rifle through for the exact cable stop for the lever.