I recently acquired a few thousand rounds of .40cal... I understand it’s not the most popular calibre out there.
.40 S&W is a very popular cartridge, 20 years ago there was talk that it was going to displace 9mm in the police market. Since the police market does much to drive the handgun market overall, if this had come to pass the .40 would have contended for the crown of single most popular. As it is, about 10 years ago police started moving back to 9mm leaving that cartridge as the undisputed #1.
Anyway, first thing is to decide if you want a traditional pistol (metal frame, hammer-fired, single or double action trigger), or a contemporary choice (polymer frame, striker-fired, safety trigger). Then, given the current shortages, you probably have to take whatever you can get within that category.
The popular guns in 9mm have mostly all been offered as .40 S&W variants at one time or another.
CZ75, Hi-Power, SIG P220 series, Beretta 90 series, Ruger P90 etc. are the traditional type.
Glock, S&W MP, Springfield XD, FN-FNS, and many more are the contemporary style.