Can one puncture a bottle cap on shabbos of a bottle that was not opened before shabbos with nail and hammer since a bottle cap is very hard to puncture? Can one than put nail and hammer back to tool box when through?
If necessary, it is permitted to do this. A hammer and nails are considered keilim shemelachtam le-issur, and it is permitted to use them for actions that are permitted on Shabbos.
Once in one’s hands (be-heiter — in a manner that is permitted), one can put back the hammer and nails in place.
However, one should preferable open the bottletops before Shabbos.
In addition, some maintain that it is permitted to open plastic bottletops on Shabbos in the regular manner.
Please see https://dinonline.org/2011/09/14/opening-bottlescans-on-shabbos/ for more details.