H1b and stem ead

can I apply for h1b and stem ead at the same time?

Yes you can, however once your H1B is approved with change of status from F1 to H1B, the STEM EAD will get denied if processed after H1B approval. If it is approved before H1B/change of status, EAD will no more be valid after H1B 8s approved with change of status.
Talk to your employer’s immigration lawyer.