It looks like a newer roof with and older boot with tar as sealant…a maintenance issue, at this point, or replace it. The flashing apron is usually visible, too.
Modern flashing is meant to last the life of a “single” roof and therefore must be replaced when roof’s coverings are replaced. Rusted galv steel will develop holes. Premature leakage is in order.
most likely it has 2 layers of shingles. the second layer (top Layer) was not installed under the flashing correctly, as that would have taken more time to install it correctly.
Improper flashing noted. Have a competent roofing contractor Replace with a proper one
Straight to the point for a competent contractor once he looks at it