Anal sex is one of the primary ways that HIV is spread sexually. This is because the lining of the anus is prone to tearing, which makes it easier for HIV to get in. Barrier methods (like condoms) should be used to reduce the risk of getting or giving an STD or HIV.
(Also, you should get tested regularly and know your status!)
Need to get tested? Find a health center near you: https://www.factnotfictionms.com/clinics