Can someone help me with this

I'm new to using Illustrator as I just found out about how good it is to use for vector art. I’ve had this problem before when creating digital art where the black outlines and the colours inside the outlines, have some weird thing around it and it looks like this on the program and as a PDF File, jpeg, png and others. A Reddit user gave me a solution but I don’t think it works unless I did it wrong.
I’m trying to make line art but whenever I finish it and preview my work, sometimes this happens and it’s frustrating as I don’t know the actual reason why this happens.