Hey there, Elangton.
Welcome to the Apple Support Communities! Thanks for posting your question about the entries in your Contacts app not appearing quite how you'd expect. I'd be glad to see what I can do to help you out.
Do you use just iCloud for your contacts, or are there other online accounts that supply information to this app as well? If you're not sure, you can check in Settings > Passwords & Accounts. You mentioned that there were spaces in the actual numbers in the app. Are any other details on the contact card incorrect or different than you'd expect? Do the numbers appear correctly on iCloud.com or are they incorrectly showing there too?
Make sure that your iPhone is fully updated by following the steps in Update your iPhone, iPad, or iPod touch and check once more.
Take care.