What does the css have to do with the picture element?
Your picture code looks ok to me.
Or were you thinking to use the picture element instead of the background image?
If so you would need to remove the background image from the css and place it using the picture element instead.
Of course if you want it to act like a background image we would need to see the wider context as it is likely you would want the image to behave like the background image and cover the content area without being in the flow itself. In that case you would need to absolutely place the image underneath the text using a stacking context on the parent. Then you’d need object-fit:cover on the image to cover the area.
There’s just too many variables to give a good answer without seeing what you have and then working out how to manage it