Raft is filled with items you can collect and craft to expand your raft. However, wandering sharks can destroy parts of your raft and everything on top of it will vanish as well. To prevent this, you can use shark bait on your raft.
To make a Shark Bait, you need to go to your Tools menu and craft Shark Bait. You need 2 Raw Herring or Raw Pomfret and 2 Rope to craft a Shark Bait.
Once you have the Shark bait, just left-click and throw it into the ocean.
After throwing the shark bait into the ocean, wait for the shark to go after it. The shark will eat the bait for 1 minute so be sure to leave during this time. Keep in mind that the shark will go after you after eating the shark bait.
Even if you throw another shark bait into the ocean, the shark will still go after you if you are in the water.
You can craft multiple shark bait if you need to distract the shark from biting you or destroying your raft. And that is how you craft and use Shark Bait in Raft!