Please explain how this rock could be shaped like this
These are fossil burrows... Looks like Thalassinoides or something similar. They are made by fishes, sea anemones, and crustaceans and can occur in different shapes... elongated, rounded, ending in t-sections, straight, spiral-shaped. A scalebar would be helpful for further classification.



Take a look at the Wikipedia page about it