Saw such blocks in a shop..The shapes are not perfect as I didnt get thick foam..so polyfil has been stuffed.
Felt of various colours
Woollen thread of different colours
Thick foam /Polyfil
Cut square pieces from different colours (6 pieces for each block). Cut alphabets/numbers from contrast colour felt. Stitch them to the square pieces and finally stitch the square pieces together to get a cube. Leave one side open and stuff from that opening. Stitch to close the opening.
An attractive toy to teach kids alphabets/numbers is ready.