If you’d like to build your own clock, there are many ways to accomplish this. On the one hand, you could go “old-school” and make a mechanical model with gears and such, or perhaps you’d like to step up a few hundred years, and make one with an Arduino or other microcontroller. Unfortunately though, either method is prone to stray from the actual time after a while.
In the microcontroller’s case you can use a real-time clock (RTC) module (like this one) to improve things, though your clock will eventually stray even with one of those. If you decided to build a mechanical version, I suppose you could attempt to reduce friction — this is how ruby bearings came about — or tune your pendulum. But unless you’re a professional watchmaker or very serious hobbyist, I’d be skeptical about how effective this will be.
Taking things in a different direction is Nick Sayer’s GPS clock. It’s available in a laser-cut wood and acrylic case, and importantly, doesn’t rely on local equipment to keep things on time. It instead gets its signal via a GPS antenna (that you’ll need to provide).
You might be thinking that since you have a smartphone, wall clocks are generally meant as decorations and being extremely accurate doesn’t matter. That’s probably generally true, however, since this clock is accurate to within 200µs— that is, 200 microseconds, or .0002 seconds—of GPS time, it can be used to time-stamp slow motion video and perhaps other high speed applications!