hell yeah it's possible
the difference tends to be that the pictures in your cookbook tend to be taken by legit photographers who treat the whole thing like a set and make sure the backdrop and lighting is perfect.
Anyone with access to a good camera will shoot some great food porn
Probably not. The food that you see in a cookbook usually isn't edible. They use things like hairspray, paint, epoxy glue, gloss, etc. to make the food look its best. The real deal will never look the same because you are making it to be eaten, not photographed. Here's just one of many articles about food styling.