Yes, you can most definitely have multiple accounts.
Keep in mind that 401(k) accounts depend on your employers - you have an account with the employer's plan, which can be traditional/Roth/after-tax/combination of the above. Some employers allow keeping your accounts with the plan after you leave, others don't. So, after switching multiple employers, it is definitely possible to have multiple 401(k) accounts. These accounts are entirely separate and independent.
IRA is individual retirement arrangement. You can have multiple accounts with multiple providers, but from legal perspective they're all pooled together. This is important for the backdoor Roth IRA transactions, RMD, etc.
Contribution limits are per account type, regardless of how many accounts you have. So if you have multiple employers with multiple 401(k) accounts, you still can only contribute $18K a year from your deferrals.