CRIRES+ detection of CO emissions lines and temperature inversions on the dayside of WASP-18b and WASP-76b