One of the cogs on my freewheel is bent and I have an assumption of how it happened I was riding up a steep road when I shifted to a lower gear and I was pushing really hard on the pedals. Then I checked my freewheel, one the cogs was slightly bent I don't know if it got bent because of that or it was like that from the start (used bike but new). so can pushing hard while shifting bend the teeth or a cog on a freewheel?
So the damage happened at the same time you shifted to a lower gear ?  I'm guessing you were pushing hard because its a steep grade, and the chain was not fully engaged in the bigger cog when you pushed hard.
 Notice the top 6 teeth are not engaged on the biggest sprocket, but are also not meshing with the next-smallest sprocket?
Image shows a 28 and 32 tooth, so this could be exacerbated by a larger tooth difference, like it the final cog is a &quot;megadrive&quot; than can be a 10 tooth difference from the next cog.
 Trying to show a view from the rear - the chain veers to the right-hand side at about the 11 oclock position.  Both photos are the same chain lay.
So this chain lay, combined with

a lot of leg power because you're going up a hill
probably the rider is out of the saddle and leaning forwards for more power,
a smaller front chainring working to multiply the leverage
a chain that has no particular weak spots

could twist a part of a cog.  And it would look like a twist too.  The other option is a fold, which would have some other kind of cause.

Also, what &quot;groupset&quot; or level is the cassette?  If its non-groupset shimano, or some pot-metal quality cheese-grade steel cog then that increases the likelyhood it failed.
As for fixing it, you may be able to straighten the cog.  Likely its all secured together into one block so you're working around the other parts.  Be aware that if you do get it straight, the metal will be permanently weakened and more likely to do this again.
The best option is to replace the damaged freewheel, which can be galling if there's significant life left in it.