KPIs are a metric and OKR is a strategic framework. A metric, like a KPI, could be in your OKR framework. If you're looking to create a broad, high-level strategic plan, then you would use the OKR framework. If you're looking to measure the success of a project, however, you'd use a KPI.