I've had this with brakes on a few bikes, some new some not.
First, make sure there's not obvious binding or problems.
Open it up. Sand the pads to break the glaze. Use something like 220 paper on a flat glass plate to make sure it's flat.
Get a genuine green 3M Scotch Brite pad (iimitations will not do) and some brake cleaner. Scrub the hell out of both sides of the rotor. Lots of pressure. Watch the fluid, it will eat paint.
Put it back together and see how it feels. Pads get old and glazed and a bad layer of material can collect on the rotor. Now got out and so some long stops from about 40 mph down to 2mph one after the other. No stopping, keep the bike moving so the rotor cools evenly. Then go for a nice long spin with no stop at all to cool it completely.
It takes a little time but costs very little money. I've seen this transform very grabby brakes into smooth as glass operators. I'm due for this myself on my bike.
Scott