suppose if we send AM modulated message signal through space how the receiver will be knowing that we applied AM modulation?
Communications systems are always designed under the assumption that both emitter and receiver know what "language" they will be speaking to each other.

AM modulation comms are standardized in frequency, channel width for example. So each receiver is materially designed to demodulate AM signals with the appropriate hardware.

When people start trying to find which modulation was applied to a signal its generally involving electronic warfare or reverse engineering.