If leading zeros is only bitcoin requirement, then what makes altering of data in blocks hard? Like now its easy to modify a block and generate new hash for every subsequent blocks since generating hash is not as costly compared to bitcoin requirement.
The leading zeroes is what makes altering block data hard. One of the things that makes a block valid is that it's hash is less than some predetermined value. For simplicity, this can be thought of as the hash has to have some predetermined number of leading zeroes. However making such a block meet that requirements is hard and being able to do so proves that you have done some amount of work, hence Proof of Work.
Making a block whose hash has enough leading zeroes is hard because the output of SHA256 Double (the hash function used in Bitcoin) is random. Given some input, you can't predict the output of SHA256d without running the data through it. So the only way to get some block data (the input) to have a hash with some number of leading zeroes is to hash it, see if it meets the criteria, and if it does not, change it and try again. This is what miners do, and the criteria restricts the range of possible valid hashes to such a small percentage of the entire range of possible hashes that it takes the entire network 10 minutes on average to find a hash that meets the criteria.
Iif you wanted to alter the data in a block, you would have to recompute the Proof of Work, i.e. you would need to find a block with your altered data that has a hash with the required number of leading zeroes. Keep in mind that it took the entire Bitcoin network 10 minutes on average to find the block you are changing, so it will probably take you longer than 10 minutes to find a replacement. Then if you want to change a block that has blocks on top of it, you would need to re-mine those blocks too. Otherwise your fork of the blockchain won't be considered the best blockchain as it is not the longest.
While generating a hash is fast, having to do it 25 sextillion (2.5 * 10^22) times on average to find a block is a lot of hashes and is going to take you quite some time.
Altering data in a Bitcoin is hard because it requires a lot of dedicated cost. The confirmation of a transaction or data implies that it is committed to the blockchain with a valid proof-of-work, which is a specific form of a cost-proof. Proof-of-Stake (opportunity cost), Proof-of-SpaceTime (memory) can all be reduced to dedicated cost-proofs.
Let's consider a censoring a specific transaction which already has several blocks of confirmation. In order to do so, one would need to invest capital to acquire 51% or more of the global hash-rate and begin mining a branch at a lower height than the confirmed target transaction.
At some point, this 51% miner will have created the longest chain and successfully reorged the target transaction out. The barrier to such behaviour is the amount of capital to acquire this hash-power.
This capital cost to acquire 51% depends on transaction fees. If fees (confirmation demand) are high, more miners will join the global pool, thereby increasing the cost to acquire 51% mining hash power thereafter.