Title 42 wasn't an immigration provision - it's the Public Health Code. So yes, they were Democratic. It has been standing law enacted by Congress long before COVID or SARS had ever evolved.
I got muted and downvoted for posting a fact... yay... ImgFlip community is awesome... https://www.reuters.com/business/aerospace-defense/trump-vetoes-major-defense-bill-despite-strong-backing-congress-2020-12-23/