Each state has their own laws,but here's how it generally works. Any state in which you earn income has the authority to assess income tax on those earnings, assuming the state has an income tax. If the income came from them, then they're the ones who get the income tax. Being a non-resident will be somewhat different than if you were a resident of that state, but you'll still owe them income tax.
Your state of residence also has the authority to assess income tax on all of your income regardless of where it is earned, unless that income is specifically exempt. The good news is that you will generally get a credit for any income tax paid to another state. As an example, suppose you won a million dollars, your taxable income for that year was $1,047,000, and your state's tax on that is $57,000. The state where you won has a lower income tax, and you pay them $48,000. Your state will credit you for the $48,000 paid to the other state, and you'll only pay the remaining $9000. so it's possible that your state will do things differently
You can run, but you can't hide. A state is entitled to income tax on income earned while you're a resident. Waiting a month to cash your paycheck doesn't change when you earned it, and neither does waiting to cash in a lottery ticket.