Worked perfectly. Would someone explain possibly what that even did. I know it's derivation realted but I'm so new to this level of tech stuff
The majority of wallets create a master private key, either from scratch or by deriving it from a seed phrase, and then use that master private key to create a branching tree of further private keys using hash functions. Some wallets follow what is known as BIP 44, 49, and 84 with the tree they create. The standard derivation path for a BIP 44 wallet (which creates legacy addresses) is m/44'/0'/0'. This means you take m, your master private key, and derive the next key using the hardened index (denoted by the ' symbol) number 44. You then take that key, and use it to derive the next key using the hardened index number 0. You then take
that key, and use it to derive the next key using the hardened index number 0. This key is then the extended key for the wallet account, and again goes through a number of derivations to generate your individual private keys. This will be /0/0 (non hardened index 0) for your first address, /0/1 for your second address, /0/2 for your third address, and so on. Your first change address will be at /1/0, your second change address will be at /1/1, and so on.
Other wallets follow different derivation paths, the most common alternative just being m, meaning you wallet just takes your master private key and appends the /0/0 for your first address directly. So instead of m/44'/0'/0'/0/0 as you would end up with above, you now end up with m/0/0.
Accounts, keys, and addresses at different derivation paths are completely separate, and for the sake of signing transaction might as well be considered as entirely different wallets. A key at any given derivation path cannot sign for a key at any other derivation path. And because they are derived with hash functions, it is a one way process and you can't work backwards up the tree (except in some rare cases which are irrelevant here) - meaning you can't take a key at m/0/0 and work out the key at m which produced it. The process is deterministic though, which means that if you start with the same master private key then you will always derive the exact same child private key at the same path.
Essentially, all you did was tell your wallet to derive at the path m instead of the path m/44'/0'/0', which was the same path your initial wallet used, and so they matched up again.