I think these are parasitized insects.
Fungi of various types can infect insects. The end stage produces these fruiting bodies. Here is an example I found on the excellent site WhatsThatBug.
Here is another example.
The second site notes
Entomopathogenic fungus (...
You've found a swim bladder. Swim bladders are largely made from collagen, so when they're dried out on beaches they feel tough and rigid.
Swim bladders differ in shape between species. As an example, the swim bladders of oyster toadfish are similarly-shaped to the one you have found, but that general shape isn't uncommon, so it could have come from many ...