the prawn i have added was already cooked im guessing this wont work
It will work. Since you have rock from a previously established aquarium you have a good head start. The rock will already have bacteria colonies. Your goal now is to get those colonies stable. They need food (the shrimp will provide), and a lot of waterflow.
My only concern is that a large piece of meat like a shrimp could overwhelm the bacteria and allow ammonia to climb too high. In my opinion it would be better to cut it into small pieces and add a little bit every few days or so.
Raw would have decomposed faster but the cooked shrimp will get there. Just don't let ammonia get too high or the bacteria colonies will start to shrink and that's not what you want. Maintaining a steady 0.25 or 0.50ppm ammonia is perfect.
Another scenario is where the bacteria is already mostly ready. This is indicated if you cannot register any ammonia. Just continue to feed them for a couple weeks with small bits of seafood or fish food and the tank will be ready for a fish.
Don't add a bunch of fish all at once. Start with just one or two hardy fish.