Time began when God started to create everything in the whole universe.

Answer:

In the beginning God created the heavens and the earth (GENESIS 1:1).

2 PETER 3:8

REVELATION 1:8

Time began when God started to create everything in the whole universe. He did this “in the beginning” of the Creation Week. According to the Bible, that was about 6,000 years ago. Before then, there were no days or weeks or years. It is hard for us to understand, but time, just like everything else God created, including you and me, had a beginning, and it wasn’t very long ago! God, on the other hand, is infinite. He has always existed, and He is not bound to time, like we are. In fact, the Bible says that to God a day can be like 1,000 years and 1,000 years can be just like a day. Time just doesn’t mean the same thing to God as it does to us. He’s “outside” of it. We do know, however that He created time on the first day of creation

Source: https://answersingenesis.org/kids/bible-questions/when-did-time-begin/