What are the objectives of the business? Do they want to drive people to opt in top these marketing preferences?
Until you know this would drive the solution you go with.
So with that in mind, without any testing and based on assumption, there are 2 things you could look at that will be the likely outcomes based on the answer to the above question:
(Yes) If the business wants to drive people to select/opt in to these marketing preferences then keep them exposed and on one page (second option).
(No) If this isn't a priority for the business i.e. this isn't a main focus. Then go with the first expandable/accordion option.
But you need to ask them if people opting in to marketing options is a goal. Its likely that the answer to this will be yes having worked with clients in general.
One point would be to test this. People may react to this differently, they could see all those options and just ignore them, who knows, but testing will iron out these things.
You could also look at where these are positioned in the flow, they dont all need to be before the buy button, they could appear on a success/thanks for your order page. Again this would depend on the business objective.