I have a Nintendo switch lite with the connector for the speaker broken off. I am looking for the best way to fix this. Is it possible to solder directly to the motherboard? I am just looking to restore the sound in a way that will last.
Your connector is still there. It's attached to the cable, but ripped off the PCB.
That's why you've got copper red-brownisch rectangles at the bottom of your plastic piece, and missing on your PCB.
Since it's ripped off, there's noting to solder it on to, so:
Is it possible to solder directly to the motherboard?
Not in general.
You will have to figure out to which contacts these cables originally connected to. If you're really lucky, it's the two narrow silverish ones, and not the two contacts you've ripped off.
The connector looks to be an SMT type similar (but maybe not identical) to this JST PH series part:
The two brown squares are where the pads were that provided mechanical support for the connector. They are now gone (still attached to the connector since the glue that holds the copper on was weaker than the solder).
The two pins you can see in my photo are the actual signal connections. So what you can do is to carefully solder the two pins back onto the two silver pads, then prepare an epoxy adhesive and (after verifying the device is functional) glue the two end pads back onto the PCB, holding it in place with clothespin or similar setup until the glue cures. There is no reason to remove the copper from the mechanical mounting pads, in fact it will harm the adhesion.