Unlike most Linux-based operating systems, Endless OS is write-protected, and can only be modified by the Endless OS updater. Endless only allows software to be installed using Flatpak, which means it is run inside a sandbox and has limited access to the rest of the system. By default, Endless OS only allows Flatpaks to be installed from specific trusted sources (Endless and the GNOME project) so it's unlikely that you will accidentally install something bad or malicious.
Viruses designed for Microsoft Windows and most other systems will not run on Endless OS. As a result, you do not need anti-virus software on Endless OS.