How can I set up autonumbering in contracts?

You must enable the Define Document Sequencing option for contracts to start assigning the number automatically.

See the topic, Define Document Sequence topic, for more information.