DIY Lead Acid powered USB-C power adapter
What you do not know yet is that the MacBook will "talk" to the power adapter and it expects a specific "answer".

This is called a "handshake". This is done using specific chips and is definitely not something a beginner can do successfully.

So I suggest that you buy a car adapter charger specifically designed to charge a MacBook from a car's 12 V system, you should be able to use your 12 V battery for that as well.

Instead of trying to build your own because I already know now that it is not going to work the way you want it to work. Very likely the MacBook will simply refuse to charge its battery. It's an Apple product and it might even expect an Apple charger. I mean, a generic USB charger might not even work.