The painting of St. Joseph and the Child was most probably created in the second half of the 19th century. Saint Joseph was Mary's betrothed and guardian and protector of Jesus, therefore, he is often depicted with Baby Jesus. His attribute is a lily branch symbolising chastity.
Paulina Kluz, "St. Joseph and the Child", [in:] "The Sacred Lesser Poland Heritage", 2024, source: https://sdm.upjp2.edu.pl/en/works/st-joseph-and-the-child-12