Creative writing is an artistic talent featured in the field of humanities. Just as with screen writers or biographies the written word is derived from some type of engagement, be it in person, in nature or through other works of art. Fiction writers find inspiration from experiences and interactions. All creativity is a compilation of sensory stimulus. A writer can for example write about the taste of an apple by, eating it to personally experience the taste, by hearing how someone else experiences the taste or by reading about it. A writer may even interpret how an apple tastes by watching someone eating one and deciphering their body language and facial expressions. They are then able to document what they have seen, heard, read or felt.
Similarly fiction writers tend to gather their character traits from people around them. A writer is not able to convey a personality trait without having interacted with it on a previous occasion, through one of the sensory inputs. It is not very often that a character is a carbon copy from a person who they have met or read about, but rather a puzzle of characteristics that are taken from others to create a character.
Writers create fictional characters with purpose and intent. A romance novel will create characters who thrive on romance as that is the reason for writing the book. The main characters will therefore be romantic in nature. Thus writer will need to create that character using the behavioural traits that promote romance. Writers will also use the features and physical characteristics from others but again, there may be influences from other people, but it is unlikely that you will be able to recognise yourself in a fictional character. You may pick up nuances or there may be instances that a character would behave in a similar way, but those are all by chance. Writers have creative intelligence and they use their skills intuitively.
A fiction writer uses a novel to entertain, influence and educate. A writer does not want the burden of real-life association especially when there is a possibility of comeback or upsetting a reader. A writer will therefore use character traits from real life, but never to the extent that such a character is recognisable in real life.
Any real-life similarities are mostly coincidental and by chance. Albeit coincidence, just in case never hurt or upset a writer as you might find yourself as the villain in their next novel.