You can't. And depending on how you had Messages set up, they may not be in your backup at all. Contacts are definitely not in a backup.
If you had Messages set up under Settings>your name>iCloud, then you were using Messages in iCloud, and they would no longer have been backed up in your iCloud backup. If you were not, then they would be in the backup, but you can only restore an entire backup, which would put your device in the exact state it was in at the time the backup was made. Any changes since then, would be overwritten.
To get your Contacts downloaded, you would need to turn on Contacts under Settings>your name>iCloud. If you want to change the contents of your Contacts before you download them to your device, you can go to iCloud.com via a browser on any computer, and update them there. Then, when you turn on Contacts in iCloud, the modified list would be downloaded.
Best,
GB