Having unprotected anal sex like unprotected vaginal sex is a good way to pass HIV if you’re having sex with someone who has HIV.
To get HIV you would need to have sex with someone who has HIV. If your partner does not have HIV there is no risk to HIV. You could have unprotected anal sex and there would be no risk. HIV would not be created/made by doing a certain sex act. For someone to get HIV they typically have it passed to them by having unprotected anal/vaginal sex or by sharing injecting drug equipment with someone who has HIV.
It’s possible for someone to be born with HIV if their mother was HIV positive but I think the chance of this happening in your situation would be unlikely. Countries like Canada and many other countries that have good medical care test pregnant people for HIV as they find with the correct care they can prevent babies from having HIV passed to them. Also if a baby did get HIV and was unable to get medical care it is unlikely for the baby to survive for long.
I don’t know you or your partner’s sexual history so it is difficult for me to give specific advice, but I can give you some general information on what you can do next. As this is playing on your mind I wonder if you feel ok with talking to your partner about their STI/HIV status and your concerns. Most people with STI/HIV do not develop any symptoms so it can be common for people to be unaware of their status. If you or your partner has had other sexual partners or risk in the past you could get a STI/HIV test.
Let us know if you have any other concerns or questions