Why when I walk for a while I get sore inner thighs am 21 week pregnant?

Round ligament. This is likely round ligament syndrome, which is quite common. Stop and rest when this happens. If needed try tylenol (acetaminophen) if not allergic. Very common and not dangerous.