Since I did not have decent grades in my bachelor's (2:2) and master's (pass with merit). What can I do for applying a funded PhD in the future? For example, working as a research assistant in a similar field? Thank you!
Depends on the country/university you apply to.
In the case of the USA or similar systems (S. Korea, Singapore, Israel, etc.), a moderately high GRE score would suffice.
In the case of the UK or similar systems (Australia, S. Africa, Germany, etc.), no way for you. This is my personal experience.
In very few countries in the EU, they accept Ph.D. students on the basis of so-called "scientific activities." You have to show them that you published in journals with good impact factors, attended conferences, contributed to society in science, etc. Then, they will ask you to appear for a written examination and/or an oral interview. If you start from zero, the overall process will take a year or so.
A prudent way would be to get in touch with professors who you think may become your advisors.
But then you will have to convince them that you are worth admission. One good method, of course, is publishing one, better two papers in high-rank journals. In the eyes of many professors, this may overweigh your low grades.