Hi waqas,
did you check the license on both switches?
You might need to unconfigure and disable OSPF, and then add the configuration from the start. Be sure to configure both side with identical settings, either both with point-to-point interfaces or both without. Please ensure that no switch is configured with an OSPF priority of 0, but without point-to-point (this requires a core license).
Erik