Can Apple decline my iPhone warranty just because my phone has dent even without looking inside the phone? I went to power mac service center to get my phone which is still under warranty fixed. They were not able to restore my phone and told me that in the event that it is hardware damage the phone will be replaced but because my phone has a small dent at the corner and had small cracks on the screen it is not under warranty anymore that is why I have to pay a big amount.

I'm puzzled because they didn't even check if the problem is caused by the dent or if it is manufacturing issues and now they are declining me of warranty.
If your iPhone is still under warranty then Apple will not reject a warranty repair unless they can determine that any damage is the cause of the issue.

Of course this will depend on how much damage there is to the phone, what the issue is, etc. Unfortunately your question doesn't specify what the actual issue is, and without a photo of your phone we don't really know what you mean by a small dent at the corner and small cracks on the screen.

Also, how do you know they didn't even check if the problem is caused by the dent or if it is manufacturing issues? In most cases there is no need to physically open the phone to determine if there is a fault.

If it was me I would be calling Apple directly and discussing it with them.