You are required to isolate the generator from the utility source in a way that disallows both to accidentally be connected at the same time. The purpose is to not have your generator out power back on the utility lines while linesmen are working on them. So a simple disconnect switch would not do that because it relies on a person making a decision as to whether it is safe.
But it does not have to be a “transfer switch” per se. There are several ways to accomplish this functionally. Your electrician can discuss what options are available in your specific situation.
That said, I’m closing this thread because your profile just lists you as retired, and we cannot allow DIY posts here.