Seed phrase/mnemonic is supposed to be 12 words or 24 words but I am able to generate keys with single word seed phrase using bip39 library without any error? what is happening here? how is this possible?
You are basically just generating a low entropy keypair. There is hard no requirement of 12 or 24 words. More info here (word count is not part of the spec).