can I just use condoms

is it safe to just use condoms to protect from pregnancy? I can’t afford birth control