You can no longer purchase or redeem "Xbox Live Gold" codes for the Xbox 360. The service was discontinued in 2023 and replaced by Xbox Game Pass Core (part of the Game Pass lineup).
Note: Some 360 games have shut down their own servers independently—online play may not function even with a valid subscription.