Here is how.
If you try this, do exactly as I say.
First - select a camera which has a lens that accepts screw on filters. Such cameras range from higher end consumer cameras to professional cameras.
Second - select a neutral density filter that reduces the light passing through the lens to 1/800 or less. The filter size should match the filter size specified by your lens. In my example - my Sony Rx100 accepts 62 mm filters. If you are going to buy a filter for the eclipse, you will need to find a high end camera store.
Test your filter by holding it up to block the light of the sun. Squint and slowly open your eye. The sun should appear as a whitish disk. Not as a bright image. If the sun is bright - you need a darker filter. I used three filters combined.
Third, attach your filter, set the camera to manual mode, live view and set focus to infinity (you should be using manual focus). Set your ISO to the lowest ISO available and set the F/stop to f/12 or f/16. Focus your camera on the sun. You may see nothing. You may see a grey disk. If the image is not bright enough for a good shot, slowly increase the ISO till the sun is white but not glaringly bright.
Refocus till you have a sharp image.
There you have it. Write down your settings. Repeat tomorrow.
Oh, go out an buy a six pack of your favorite beer. Maybe a 12 pack. You’ll need some for tomorrow.
The first picture is of the sun taken with my Sony Rx10 and 3 filters, 2 ND400s and an ND8. Numbering is tricky. And ND8 could also be numbered ND103 and ND 0.9. Unless a person is familiar with this, it would be easy to make a mistake. A person might think that three ND 103s would be almost as good as one ND400. Three NB103s would let you burn your retina.
The second picture is of my camera.