How are sand blocks formed?
There are two "normal" mechanisms for this effect:

Clay bonding, the beach sand contains a small fraction of clay particles which bond to the grain surfaces and hold the sand together when dry, this is normally the mechanism where the beach is backed by mudstone cliffs or quite close to river mouths supplying fine sediment to the beach.

Evaporite Cementation this is the more widespread and common process then what you are seeing is a small scale, and often abortive/short-lived formation of "Beachrock" this is the most likely explanation and the cause will probably be a rainwater/seawater interaction on the surface of the beach where it is still wet with seawater but no longer wave-washed as the tide recedes.