so basically while seeing the bitcoinjs documents, to create a transaction we need a "TXID" of a pervious transaction. so if I have a wallet with multiple transactions and all of them are deposits, then which one do we need its TXID now? can anybody please explain?
You don't need TXID you need UTXO (Unspent Transaction Output) which contains [received] transaction hash, index of the output in that transaction, amount of the output in satoshis and finally the pubkey script (that should correspond with the address you are spending from).
You get a list of them that belong to your address and spend as many of them as you want granted you don't violate any standard rules (ie. don't end up with a huge tx).
also, why do we need a watch only wallet first before signing transaction?
You don't need a watch only wallet first, it is an option to maximize security.
when spending from paper wallet, we need to create a watch-only wallet first, then electrum gets some data from bitcoin network and save it into a file, then we sign that file with the real-wallet.
Electrum gets a list of UTXOs for your address and then it creates an unsigned transaction that has everything expect signatures set (such as inputs and outputs) then puts it in a file that you can transfer to cold storage for signing. The cold storage reads the file and signs the transaction (not the file) then you can transfer the signed transaction in that file to the online watch only wallet to broadcast.