Shingle roof - What are these?

Just wondering if anyone has encountered these sticking out from under the shingles? There were two of them at the rear of the roof (above the first row) and one on the front roof, mid-way up. The one by itself had damage to the shingle that was on top of it. They appeared to be plastic, I’m not sure of the purpose. This was a new build in Ontario. Thanks

Could this be for attaching future solar panels? I found this:

That’s where the siding contractor nailed their pump jack brackets to the roof. Then they slide a piece of step flashing (or other) under to fix the nail holes. Those are apparently sliding out because some contractors just slide them under the shingle without fastening them.

That makes sense, thank you.