Moth pupa, most likely, could be a hawk moth. I used to collect Privet zhawk moth caterpillars and keep them until they pupated, then watch them hatch; I’d put them on damp blotting paper to help the pups case soften, then release the moths once their wings dried out.
If you’ve got some sand or fine soil, put it into a sandwich box or some other small container with the pupa on top, and wait and see what hatches, shouldn’t be too long now.
This is a privet hawk moth pupa, which looks very much like what you’ve got…
And this is the adult, quite a beautiful creature…
It should be treasured, and certainly not killed!
This is an Elephant Hawk moth pupa…
And this is the glorious adult moth, looks too exotic for a British moth…