Never, ever, use WD40 on a bike. Suggest you now wash it all off, use lots and lots of water, and then re-lubricate.
There again, you could just leave it, and learn the hard way why you should never use WD40 on a bike.
Personally I gradually replace everything that starts to squeak with the equivalent but with sealed for life bearings, so I just renew the entire bottom bracket, for example. I also wax chains, i.e. take them off, wash them with a bit of soap and water and then boil them in a pan of wax when they need it.
I do have a little bottle of oil, had it for years, carry it around for those instances of meeting a damsel in distress with a seized chain. At my age you need such things.