We know that nuclear material like DNA and RNA are the basic elements to consider an organism as a living being. Viruses contain nuclear material but can not exist independently require a host for their survival. Therefore though viruses appear more primitive than bacteria , they could not have been the first to evolve
Bacteria where the first living creatures for two reasons. First the scientific community has decided that viruses are not alive because they do not meet all of the five characteristics of a living creature. Second is that Bacteria existed looooooooong before viruses. I could simply say that is because they were indeed first but I will also explain why. To procreate a virus requires a cell to invade. This is one of the reasons a virus is technically not alive but also viruses are not cells and bacteria are so if viruses existed first it would be impossible for them to procreate and exist. There for bacteria had to exist before viruses could develop.