Welcome to YT

I would agree that a firm "NO" (IF caught in the act), then
gently moving the pup to the desired location works really well...once he's a couple months older. At 10 weeks, they have such little control of their bladder/bowels that they're not planning ahead to get to where they need to be - they just go. Also, at such a young age, your baby should be confined at night (crate or ex-pen) not only for potty training, but for his own safety. This will also help immensely with the potty training, but just be prepared to get up a couple of times a night to take him out. Patience and consistency will be key. Good luck to you!