My day job working with other musicians has sometimes required me to learn a song either by ear or occasionally from hand written sheet music which is on a par with attempting to interpret an old-fashioned, handwritten doctor's prescription. I'm pretty good at it but I've worked with people who are better and I don't know how they do it.
Depends on how into it I am. If I'm not super invested in it, it'll probably be one of those songs I'll know if I hear it kinda thing. If I'm really invested in it, maybe a few days to get the words down? I'll usually be listening to it on repeat and singing along to it, so that always helps.
If it's a song I really love I will listen to it over and over again while reading the lyrics so I can memorize them and sing along with the song. It takes me a bit to fully get all the lyrics down.
If it is a song that I really like, it won't take me more than 3 days to learn all the lyrics. Believe me, it is always a good experience singing along when such songs play.
I feel like a lot of songs now have similar music so it isn’t hard for me to learn the beat…but words sometimes can take me a few days depending on how catchy it is.