This is one of the most important social challenges inside, and how you handle it matters for the rest of your time there. The answer is not a script; it is a positioning strategy that starts long before the ask happens.
The inmates who rarely get approached with these requests are the ones who have made their character clear through consistent daily behavior. Keeping to yourself, being polite but not overly social with the wrong crowd, and establishing early that you are focused on your own time and your own goals sends a signal without a word being said. The ask comes when people think you are available for it.
When the ask does come, the most effective response is calm and brief. You do not need to justify it or explain yourself. Something as simple as saying you do not get involved in that, said without drama or aggression, and then moving on, is usually enough. People who respond with anger, lectures, or lengthy explanations invite a more prolonged interaction. People who decline flatly and move on tend to get left alone.
The harder truth is what comes after the decline. If you are spending time with a group that is regularly breaking rules and asking others to participate, declining once may not be enough. Being in proximity to that group makes you a target for suspicion even when you say no. Seeking distance from those people, whether by changing your routines, your associations, or requesting a housing change, is the more sustainable answer. Guilty by association is a real consequence inside, and it can cost time you cannot afford to lose.