People sometimes suggest that the absence of any sources writing about Jesus during his lifetime is a major problem. Why wouldn't anybody have written about him if he existed or, at least, if he was as significant as Christianity claims he was?
Other prominent religious leaders in Israel who lived around the same time, such as Gamaliel and John the Baptist, also aren't mentioned in extant documents dating to their lifetime. Many prominent philosophers and political and military leaders of the ancient world aren't mentioned in extant documents until after their death. There are a lot of potential reasons for that.
We need to distinguish between what's written and what's preserved. Jesus was written about in his lifetime. The titulus on the cross is an obvious example (Matthew 27:37). He probably would have been written about in other contexts surrounding his execution as well. (See the references in Acts and elsewhere to how Jewish, Christian, and Roman authorities frequently used letters to communicate, including in contexts of religious persecution and trials: Acts 9:1-2, 15:22-30, 23:25-33, etc.) Luke refers to "many" accounts of Jesus that circulated before he wrote (Luke 1:1-2). Even if Mark and Matthew were among them, those two alone probably don't explain a term like "many". Richard Bauckham has observed, "Such notebooks [as ancient rabbis used] were in quite widespread use in the ancient world (2 Tim 4:13 refers to parchment notebooks Paul carried on his travels). It seems more probable than not that early Christians used them." (Jesus And The Eyewitnesses [Grand Rapids, Michigan: Eerdmans, 2006], 288) Most likely, a much larger number of documents discussing Jesus than the ones now extant were circulating in the early to mid first century. It's likely that some dated to Jesus' lifetime. Are we to believe that no authorities wrote anything about Jesus in the context of his execution, that people were producing "many" (as Luke put it) accounts of Jesus just after his life without having written anything during his life, that everybody refrained from the practice of using notebooks to record anything about Jesus during his lifetime, etc.? Most likely, our lack of documents about Jesus from his lifetime is a matter of nothing being preserved, not nothing being written.
We have no reason to expect somebody like Philo of Alexandria, living in Egypt, to mention somebody like Jesus (or Gamaliel, John the Baptist, Paul, etc.) just because he was a contemporary. Whether you mention one of your contemporaries is determined by a lot of factors: the topics you're writing about, your audience's interests, whether you think other sources have discussed the figure in question adequately, etc. People often deliberately neglect a subject, even to the point of ignoring it, to show contempt or to accomplish something else:
"Without immediate political repercussions, it is not surprising that the earliest Jesus movement does not spring quickly into the purview of Rome's historians; even Herod the Great finds little space in Dio Cassius (49.22.6; 54.9.3). Josephus happily compares Herodotus's neglect of Judea (Apion 1.60-65) with his neglect of Rome (Apion 1.66)." (Craig Keener, A Commentary On The Gospel Of Matthew [Grand Rapids, Michigan: William B. Eerdmans Publishing Company, 1999], n. 205 on 64)
Jesus didn't become a prominent figure until shortly before his death, and events developed rapidly and shifted radically over the next several years (Jesus' crucifixion; reports of his resurrection; the conversion of former opponents, like his brothers, the "great many" priests of Acts 6:7, and Saul of Tarsus; the expansion of the church). An account written about Jesus a year before his death would be significantly incomplete a year later and even more so five years later. Similarly, people wanting a biography of Ronald Reagan today probably would prefer one written ten years after his death to one written thirty years before he died. The later biography would be more complete, would represent a more mature reflection on Reagan's life, etc. If the later biographer has better credentials, that would provide more reason to prefer his later biography over the earlier one.
As I've documented elsewhere, early opponents of Christianity corroborated much of what the early Christians said about Jesus, including on such important issues as his birthplace, his performance of apparent miracles, and the empty tomb. There's no reasonable way to deny that those non-Christians would have been relying on earlier sources, whether written or unwritten. And the notion that they had no written sources on Jesus is tremendously unlikely. The fact that they were corroborating so much of what Christians were claiming goes a long way in explaining why they didn't have much motivation to write more or preserve more. By contrast, if Jesus didn't exist or was much different than Christianity claimed, and that's why we don't have texts referring to him during his lifetime, then the non-Christian corroboration of Christian claims makes far less sense.
Christians, who were initially much smaller in number and culturally far weaker, would have been focused on preserving their own most valued documents. They didn't have as much access to non-Christian documents as non-Christians did, and they weren't the ones primarily responsible for preserving those documents. When the early Christians were choosing which documents to preserve, they had good reasons, like the ones discussed above, for preserving documents written after Jesus' lifetime rather than during it.
A courtroom analogy might be helpful. Though we'd like to have video of a crime that's been committed, testimony about the crime written while it was occurring, etc., we usually don't have that. And few people, if any, argue that we need it. Rather, we're satisfied with testimony about the crime given after its occurrence, sometimes years later. And even if some testimony about the crime predates the trial, it's often the trial testimony that gets more attention and is more likely to be preserved over time for various reasons (people were testifying under oath with the potential for legal consequences if they were dishonest; testimony preserved in legal documents has the credibility of the legal system behind it; testimony given later rather than earlier can be more responsive to arguments and concerns that developed over time; legal documents are often easier to attain than something like a record of a private conversation a witness had with another person; etc.).
But wouldn't the early Christians have had an interest in preserving at least some accounts of Jesus that were contemporary with his lifetime? Even if non-Christians didn't want to preserve such sources, because the facts surrounding Jesus' life favored Christianity, why didn't Christians preserve at least some of the relevant material? Most likely, they did. Luke's "many" sources referred to in the opening of his gospel may have included some sources contemporary with Jesus' life. I've argued that the Shroud of Turin is a preserved artifact from Jesus' lifetime. Later sources, like Justin Martyr and Origen, show an interest in non-Christian corroboration of Christianity (e.g., Justin's citation of a Jewish document or tradition about Jesus in section 108 of his Dialogue With Trypho). But the Christians who made an effort to preserve such material probably were few and far between.
That's usually the case with people in general, both Christians and non-Christians, in every generation. The average person doesn't have enough interest in evidential matters to preserve a large amount of evidence over a lengthy period, like two thousand years. The large majority of Christians would have been satisfied with the sort of material we see in the New Testament, which includes the testimony of eyewitnesses and former enemies of Christianity (James, Paul). Similarly, it would be good if the information we had about the lives of ancient non-Christian philosophers and political leaders came from a larger number of contemporaries and eyewitnesses, if more monuments and other objects pertaining to their lives had been preserved, etc. But that didn't happen. Some people would have wanted to preserve that sort of additional evidence over time, but the large majority would have been satisfied with less evidence. And the small minority who wanted more usually wouldn't have preserved that additional evidence for something like two millennia, down to our own day. That's true of the evidence we have for ancient history in general, not just the evidence pertaining to Christianity.
In the earliest generations of Christianity, the truthfulness of the religion, including hostile corroboration of it, would have seemed more obvious than it did later. Initially, there would have been less of a need to preserve early sources. Many of the facts surrounding Jesus' life would have been widely agreed upon or could have been sufficiently verified by the oral testimony of living sources. Preserving written sources became more important later. In some ways, skepticism would have become more plausible over time. Early on, most Christians wouldn't have seen much of a need to address the sort of radical skepticism that's developed in more recent centuries, to the point of even denying Jesus' existence. Skepticism has become more radical for a variety of reasons, one of which is that it's had to become more radical in an attempt to get around the evidence we have. It doesn't follow that the evidence is insufficient. For example, Josephus wrote about Herod the Great nearly a century after Herod's death. The lateness of Josephus' material doesn't prevent critics of Christianity from using that material to argue against the infancy narratives at Christmastime, for example.
To get a better idea of how most early Christians probably viewed the evidential status of Christianity, think of the letters of Paul. In his letters, we have the testimony of a contemporary and eyewitness of Jesus (an eyewitness of his life after the resurrection, at least), one who knew members of Jesus' family and his closest disciples, one who had been an enemy of Christianity initially, one who preserved even earlier material in his letters (e.g., the creed cited in 1 Corinthians 15), one who referred to events in his day that align well with Old Testament prophecy, etc. That he wrote shortly after Jesus' life rather than during it doesn't take much away from Paul's testimony. To this day, skeptics have nothing close to a good explanation of the evidence for Christianity in Paul's letters. It would be helpful to have more evidence pertaining to Paul's life and the issues he addresses in his letters, but it's a matter of preference, not necessity.