when a miner solves the problem in less than one timestamp then what does it do with its extra capacity? If a miner solves the problem in less than one second then how does it use the extra capacity.
The resolution of the timestamp in a Bitcoin block header is one second.  However, if a miner should find a valid proof-of-work and create a valid block, they do not have to wait one second before starting work on a new block.  It is perfectly legal for two successive blocks to have identical timestamps.  In fact, it is legal for the succeeding block to have a timestamp that is earlier than that of the preceding block by up to 7200 seconds.  See Why is two hours the maximum acceptable offset for Bitcoin blocks?

So a miner can immediately start work on a new block, and this is normally what they actually would do.  Hence there is no "excess capacity" at all.