Welcome aboard. Lots of good advice in this thread. Couple of thoughts:
First, I don't agree with the general recommendation that a first handgun should be a revolver. Think through what you want your gun for, and decide which is the better platform for your purposes. If you plan to use a semi-auto for range and self-defense, by all means legally acquire a semi-auto as your first gun. If you think you're more likely to move toward revolvers, that should be your first acquisition.
Second, while it's not a "rule" in my book, I do often recommend that a .22 be a first handgun, simply because they tend to be less expensive (unless you want a quality .22 revolver) and cheap ammo makes for a lot of inexpensive trigger time developing skills that will serve well when one moves on to larger calibers. Again, not a hard rule, and if you've already shot handguns extensively, a .22 makes a good subsequent addition if not a first purchase.
Third, .40S&W is a great cartridge. Most handguns available in 9mm have a .40S&W counterpart that is close (if not identical) in size. The Glock 19 and Glock 23 are a good example. The .40 has comparatively snappy recoil that many dislike, but if you're comfortable with it, go for it.
Fourth, handle and shoot as many different models as you can before making a final decision. There are far too many options out there for anyone here to make a definitive recommendation. I can tell you what I like, but I can't tell you what YOU will like! So you need to find a handgun you can shoot comfortably.
Let us know what you decide on, and pics are always welcome!