Yes, it can, in two different ways.
1. While taking it. Progestins differ in how androgenic they are. Pills with levonorgestrel, norgestrel or norethindrone have more androgen-like activity and can worsen thinning in women who are genetically prone. Pills with drospirenone, desogestrel, norgestimate or cyproterone are lower-androgen and are often preferred for women with hair concerns. The hormonal IUD (levonorgestrel) and the implant (etonogestrel) are also reported to trigger shedding in some users.
2. After stopping. Coming off the pill can cause a telogen effluvium 2-4 months later, similar to what happens after pregnancy. It usually settles within 6 months.
If you notice thinning on a specific method, it is worth asking your doctor about switching to a lower-androgen option rather than stopping contraception abruptly. A blood check of ferritin and thyroid is also reasonable, since those are common co-factors.
Disclosure: I work on the editorial team of an online pharmacy, general information only, not medical advice.