I am a bitcoin beginner (a non-UK person, who is currently based in UK).
~ then in which country will I have to pay capital gains tax or loss?
what do you mean by "currently based in UK"? study, work, live, or what?
basically your tax obligation depends on your residency status in the UK
cmiiw, a nonresident alien usually pays capital gains tax to his country of origin