You only have to worry about legal ramifications when buying if you're buying a controlled substance, usually this involves hard drugs. Testosterone is usually controlled, depending on where you live, and you can technically get done in for that, but I think it's very rare anyone just buying it does, not sure if there's even examples of that. Some steroids might be controlled, you can check on wikipedia usually.
Peptides and pharmacy medicines it's perfectly fine for you to have and buy.
You only have to worry if you're a supplier or distributor otherwise, and buying a lot, regularly, might be a sign for the police to suspect you of being one. They'd need other evidence to corroborate that, but no one likes a police visit regardless.