Is there a way to keep a shoebill bird as a pet, if so how much would it cost?
Considering it’s an endangered species, no, there’s no legal way to get a shoebill as a pet, and honestly

With that beak, I wouldn’t want an angry shoebill.
But let’s imagine that you manage to have one of these animals illegally. How much would it cost to have one of these impressive descendants of the comfortable dinosaurs?
First, the environment.
It is not like keeping a dog or a cat, being a wild animal it would need a pleasant environment, and a shoebill environment…
It is neither easy nor cheap to simulate
Then there’s the food, so if you don’t want to end up the way you think this duckling is going to end up…
You’re going to have to feed it. Of course, you will not find lungfish, its main prey, in the fish market of your town or city
Even so, any fish of considerable size, such as trout or salmon, can be a good substitute.
Sure, a trout a day
Ultimately, you can’t have a shoebill, and it would still cost quite a bit. Possibly if a shoebill could be obtained, it would be a pet that only rich people could keep in stable conditions
Postscript: Calm down. Nothing happened to the duck, beyond a scare