All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Your sister establishing an affectionate relationship with that man before marriage is wrong and evil. Girls taking boyfriends (or boys taking girlfriends) is a matter of the Jaahiliyyah (Pre-Islamic Era of Ignorance) and Islam abolished it.
Allah Says (what means): {They should be] chaste, neither [of] those who commit unlawful intercourse randomly nor those who take [secret] lovers.} [Quran 4:25]
You should have prevented her from this evil as you are her guardian. Allah Says (what means): {Men are in charge of women.} [Quran 4:25]
Guardianship and being in charge mean protecting the worldly and religious interests. As-S’adi said:
"{Men are in charge of women} this means that men are in charge of women in terms of obliging them to fulfill the rights of Allah due on them by observing His obligations and preventing them from committing evils. Men are obliged to enforce this.” [End of quote]
Forbidding evil is obligatory according to one’s ability. Abu Sa’eed Al-Khudri narrated that he heard the Prophet say: “Whoever amongst you sees an evil, he should change it with his hand (i.e. physically); if he is unable, then he should change it with his tongue (i.e. verbally); and if he is unable, then he should change it with his heart (by detesting it in his heart), and that is the weakest level of faith.” [Muslim].
If a woman gives birth to a child in a period of less than six months of her marriage, then the child should not be traced to the fornicator (or adulterer), but it should be traced back to her, according to the view of the majority of the scholars, and this is the view that we adopt here in Islamweb.
Nonetheless, some jurists are of the view that if the fornicator accepts to trace the child back to him, then it is acceptable.
Nevertheless, it is very important to mention here that the six months should be calculated according to the lunar months, and not the solar months. So, please be heedful of this. Therefore, if the child is born in six lunar months, then it is his son and is traced back to him.
If we presume that this child was the result of Zina (fornication or adultery), then if she repents and turns to Allah, you are not allowed to abandon her. As a matter of fact, even if she does not repent, it is permissible to keep ties with her, and it may be that keeping ties with her is better. Deserting a person or keeping ties with them depends on the benefit resulting from this, as stated by the scholars.
For more benefit, please refer to Fataawa 378067, 378067, 97254, and 158403.
Allah knows best.