I've no idea whether this will work for you. It did for me as a teenager (I'm way past that now and don't know if I could do it again if I tried). I do have an interesting story on Quora about how I did regain this ability after an ear injury twenty-odd years ago.
This is "developing relative pitch".
Have one instrument that you love to play (a guitar in your case, I assume). Every day, sit down with it and play one note ... let's say, since it's guitar, an open G.
Listen. Play it again, listen. Hum it. Sing "la" on it. Listen, play it again. And again.
After a few minutes, put the guitar down and do something else for a minute or two. Hum the "G" ... then go back to the guitar and see if you hummed the correct pitch.
Do this every day ... as often as possible without driving yourself crazy.
Once you can pick a "G" from thin air, learn to play G - A and then sing both notes. And G - F and then sing both notes. Listen to how "A" is higher than G. Listen to how "F" is lower than G. See if you can pick "A" from thin air based on your knowledge of its relationship to G. See if you can pick "F" from thin air based on your knowledge of its relationship to G. Continue with B, with E, etc., etc.
This is developing "relative pitch". Rick Beato has some fascinating stuff on YouTube about "perfect pitch" and its relative cousin, and how we (as non-toddlers) are going to have to settle for the latter ability.
However, there's nothing too wrong with that. I did this as a high schooler with B-flat on the trombone and it paid off "in spades".