How to solve CSES problem grid paths?

I started getting into programming at the start of this year, and I have been solving CSES problems that my teacher/mentor suggested. The few problems I did before (DP) either I could solve on my own, with some outside help of optimizing them, or I had a vague idea that I understood after watching a video about the problem. Unfortunately, I don’t have even the slightest idea of how to solve grid paths? Can someone help me, explain the concepts, etc…?

Note(I program in python, this is my first time posting so sorry if the question is badly phrased or if my grammar isn’t good)

which one?

https://cses.fi/problemset/task/1625

https://cses.fi/problemset/task/1638

The first one

see the usaco guide editorial