Can bitcoin transactions be modified during mining Wherever I read about fraud in bitcoin, it talks about modified a transaction that is already in a block and changing the receiver and then trying to create a longer chain.

However, I was wondering, if we can modify a transaction thats already in the block, why can not a miner, modify a transaction at the time of mining itself. And if he is lucky, he can find a block that will make the transaction unmodifiable.

PS. Kindly excuse me for such a silly question, as I am a student in bitcoin and blockchain.
Generally, no. Most transactions contain a digital signature which signs a hash of the transaction. Usually this hash includes the entirety of the transaction, so changing any part of the transaction would invalidate the signature and thus invalidate the entire transaction.

There are some exceptions though. There are some signature hash types which don't include specific parts of the transaction thus allowing output to be changed, inputs to be added, etc. There are also some transaction output types which don't require a signature. However these signature hash types and output types are not created by wallet software. Making them requires you to know exactly what you are doing and either make it by hand or use custom software. The vast majority of users will never need to use or make such transactions.

Whoever told you that transactions can be modified in a block and then the blockchain extended to make that transaction valid is completely wrong. Besides the fact that transactions cannot be changed like this and still be valid, including a transaction in the blockchain does not automatically make it valid. It must be valid to be included, and if it is invalid, the block is invalid and nodes will reject it so it isn't actually added to the blockchain that everyone is following.