I assume with had you mean you have a valid residence permit for the Republic of Ireland (ROI).
It is a mistaken notion that the Common Travel Area is similar in nature to the Schengen Area where 3rd country citizens with a residence permit are allowed to undertake a short term visit to another Schengen country.
Common Travel Area rights can only be exercised by citizens of Ireland and the UK. If you are not a citizen of Ireland or the UK, you will not be able to exercise Common Travel Area rights.
A ROI or United Kingdom residence permit only allows you to reside in the country that issued it. It does not free you from the obligation to get a Standard Visitor visa or a Short stay tourist visa if you normally require one.
Will this affect my UK visa process if I apply for UK visa in future ?
Yes, since you were found within the United Kingdom without a valid visa and this was documented.
The question is how they will treat this attempt to illegally enter the United Kingdom.
My advice is to apply for Standard Visitor visa with a cover letter, containing the details of what happened in Belfast, explaining your misunderstanding of the Common Travel Area rules and that you would like to rectify the situation.
With the result of the application you will then know for sure what to expect in the future. If the the application is approved, do not assume that the incident has been forgotten (they have a long memory). If not approved, you will get an extensive letter explaining the reason why.