AP vs IB

I study in a school which doesn’t administer AP and IB.

However, I have been told that both the exams provide college credit.

Which is more preferable? Which will give me more credits?

You cannot take IB exams unless you take the corresponding IB class (as part of a recognized IB program).
You can self-study for AP exams without taking the class. So, this is really your only option.

Go to the web site of each college of interest and search for “AP credit” and “IB credit”. Which gives more credit depends on the college and the specific subject.