C wire for smart thermostat
Move the yellow wire from your thermostat to where the blue wire is connected now...
Since whoever wired this up didn't use standard color codes, we'll have to go in and clean up a bit after their work first.  The first step is to remove the blue wire in the thermostat cable from its current junction with the yellow wire from your HVAC system.  Said yellow wire then gets nutted to the currently-unused yellow wire from your thermostat-cable, making that yellow wire the Y wire going up to the thermostat.
...and connect the blue wire from your thermostat to the grey wire from the HVAC system
Now that we have that taken care of, according to the wiring diagrams you posted, the grey wire from the transformer is your C wire.  In your photos, we can trace that grey wire over to one side of the compressor contactor, then from there down on to where it hangs behind the thermostat cable.  As a result, you can connect that grey wire to the now-free blue wire in your thermostat cable, wire up your new thermostat as normal, turn the HVAC back on, and enjoy!