Note. Matthew 2:15 applies this line to the child Jesus brought back from Egypt. In Hosea “my son” is Israel itself, called out of Egypt at the exodus.
In context
1Israel was a boy when I came to love him, and out of Egypt I called my son. 2The more they were called, the further they went away; they kept sacrificing to the Baals and burning offerings to carved images. 3It was I who taught Ephraim to walk, I who took them up in my arms; and they never knew that I was the one healing them.
