Yes, an experienced locksmith should generally have the ability to make a lock from a key. However, it is important to remember that the steps involved in this process can be challenging for even experienced locksmiths and may require some patience on the part of the client or customer.
In order for a locksmith to recreate a key from a lock, they will need to take one of a few approaches: they can attempt to impression the lock, cut a new key to code, or actually take the lock cylinder apart to measure the components inside of it. Any of these approaches may require some additional tools for the locksmith to have on hand, such as a code cutter. This underscores the necessity to give a locksmith as much information as possible about the needs of your project before they arrive to help you.
Be aware that some locks will prove more formidable than others, and maybe even prove impossible. There are locks with certain features that prevent a key being made without access to the original key. In these instances, it may be far more efficient for a locksmith to replace your locks rather than investing large amounts of time on a near impossible effort to make a new key altogether.
In the end, it is almost always a good idea to work with a professional rather than trying to do something as complex as creating a new lock on your own; rather than risk damaging your lock and spending frustrating amounts of time, make the smart move and hire a trusted locksmith professional.