I parked my 2021 car for more than 7 weeks during January and February ,in the open air. I plugged a solar trickle charger like this into the OBDII port.
https://www.ebay.co.uk/itm/124812935438?The charger is only 2.4 watts maximum capacity, but despite the short daylight hours at the time the charger gave a very small trickle charge. The car started no problem.
The car might have started anyway even without the charger. The car was very new at the time and had recently had some long journeys so the 12v battery was probably in good condition and fully charged.
This solution worked for me, but tbh its not very convenient for regular use. The charger is quite bulky and the OBDII port is quite hard to reach in the drivers footwell (on a right hand drive car) I had to go on my hands and knees by the side of the car to plug it in, although it might get easier with practice or easier on a left hand drive car. I have not needed to use the charger again since then so cannot guarantee it will always work , especially with older batteries, or cars that get little use.
I now always carry a small power bank jump starter in the car which I hope would start the car if the 12v battery does go flat. These should be recharged every 3 months , but mine is normally still about 80% charged after that time. I have never needed to use this jump starter. I think it should work, but robsterboys experience has left me in some doubt ???l
Something like this -
https://www.ebay.co.uk/itm/267785896110?