How to write the patent specification in sections?

As long as there are necessary technical characteristics between the two, they can be applied together.

There can be two independent claims in the claim, namely, the method independent claim and the product independent claim, and each independent claim can be followed by a subordinate claim.

Therefore, the description should be consistent with the claims.

Supplement: The dependent claim is next to the independent claim it refers to, and then write another independent claim.