I’m unclear about this. Do I sand the walls after priming them? Do I have to? What grit # would I use?
Sanding normally takes place before priming. Sanding walls before priming is for smooth (non textured) surfaces that have hard glossy coats. This practice does help the primer adhere but modern acrylic primer do a great job without sanding.
The best practice is washing the walls to remove any dust or greasy films. This alone can make a big difference.