Question on reporting selling put and call options

In 2020, I made the following four option transactions:

 
In June, I sold a covered put option that expired after 30 days I received a premium of $24.00.
 
In July, I sold a covered put option on the same stock that was exercised which resulted in me buying 100 shares for $4,300.00. I also received a premium of $25.50.
 
In August, I sold a call option on the same stock I purchased that expire after 30 days.  I received a premium of $32.00.
 
In September, I sold a call option on this same stock which exercised resulting in me selling my 100 shares for $4,700.00.  I also receives a premium of $31.50.
 
I know these are all treated as capital gains but I am not sure how they would be recorded on form 8949.

Are the two premiums on the expiring contracts treated as separate transactions with a zero cost basis?
 
Do I report the premiums from the exercised transactions the same way as above or do I ONLY use these two premium to adjust my cost basis on my stock sale and purchase.