how to put the spectator mode in Minecraft Pe 1.20 Bedrock Minecraft Servers

how to put the spectator mode in Minecraft Pe 1.20 Bedrock