Never out at sea.
Have flipped in the surf while shoring the boat taking the dog into land.
Have flipped next to the boat or dock.
Mostly boarding and unloading.
What happened... (Besides getting wet,,,)
At shore, stand up, flip the kayak, secure, collect yourself, paddle back. Spend the rest of the trip trying to get all the sand out of everything (this usually happens back at the dock).
At the dock, pray the boarding ladder is deployed, collect & secure, proceed.
At the boat, collect your pride, get on the swim step, tidy up.
You learn to tie everything off and the different configurations needed to keep yourself and your stuff safe and collected.