Try this practice problem: you have cities and flights. Each flight goes from city to city with price . Find the cheapest flight from city src to city dst with at most stops. This is shortest path with a constraint. You cannot use standard DAG DP because you need to track the number of stops.
Use DP with state dp[u][stops] = cheapest cost to reach city with exactly stops. Process in BFS order (by number of stops), and relax edges for each stop count.