Can I configure ospf and Statice route at same time

can I configure ospf and Statice route at same time

Yes! we can configure OSPF as well as static route on the same router at the same time.
For selecting the best path the router uses the “route preference criteria”.
The route-preference criteria is listed below:

  1. Longest prefix match.
  2. Least AD(Administrative Distance).
  3. Least metric.

Note: the criteria is checked in the sequence and only checks the next criteria if the current one is tie.

Hope this helps!
Thanks!