What to do with state refunds received from amended return?

I amended 2018 return and received the state refunds in 2020 and federal refund in 2021.

Do I input these state refunds (had multiple state income) in 2020 return?

And what should I do with federal refund? Report in 2021?

I really appreciate any advice.