Hello and welcome!
A used car seat that has been gifted from someone else can be a great way to save money IF the car seat is safe! But the first thing to do is to check for its safety by using the following
used car seat checklist. Basically, unless you know 100% that (1) the seat has never been in a vehicle while the vehicle was in any sort of crash, (2) the seat is not expired, and (3) any recalls on the seat have been fixed, then you should NOT use the seat. The checklist will take you through a series of questions to make sure that there are no issues!
The car seat should have a sticker somewhere that has the brand name, model name/number, and expiration date. (If it does not, then you have no way of checking the seat for recalls, and therefore should not use the seat.) From that, you can figure out what strollers are compatible. Cosco and Safety 1st are both made by Dorel, and so it is possible that some Cosco car seats are compatible with some Safety 1st strollers and vice versa. But you'll want to find check the model name of the particular car seat and stroller to be sure.