301 redirect use for transferring your traffic to another domain or another link.
like your domain is “abc” . You want to buy new domain with different name like “abcd” and you don’t want to loss your first domain traffic then you can set 301 redirect in your “abc domain” hosting account.
which should be “abcd” in cPanel “301 Redirect”
A 302 redirect is a temporary redirect. There are very few instances where this type of redirect should be used, but unfortunately it is the easiest to implement. This means that many webmasters unfamiliar with search engine mechanics use the wrong type of redirect.
Always Remember “301” used for Permanent Redirect. and “302” used for temporary Redirect.