How compact are you talking?
Agree magnatiles are great, but I wouldn't call them compact. If you are looking for really small, my 19 month old is a big fan of those wooden apple lacing toys. She also has an alphabet/numbers puzzle that is by far her favorite toy. She'll sit with it for way longer than anything else. Not super compact but it lays flat.
https://www.amazon.com/Sendida-Alphabet-Number-Montessori-Toys/dp/B07PK53TH7
One flag though is that the pieces are not huge, so I have to watch her carefully and we don't give her the little counting rings because they are small enough to swallow. If you have a kid particularly interested in eating toys, may want to wait on this one a bit.