Talk to your doctor. Typically, it should be very mild, nothing strenuous like weights. Walking is by far best. You should be able to carry on a normal conversation while walking. If you cannot, you are going too fast. If you get tired, it is very important to rest or you could damage your heart further.
They should have talked to you about this in the hospital.
I have included a link to the American Heart Association.
One of the key drivers in what you can and cannot do is how much damage was done by the attack. I suggest you read up on heart failure
, it is a very depressing topic but it's good information. Hopefully, you will never go there. However, overdoing exercise could cause it. Moderation in all things they say.
Do a Cardiac Rehab program if you can swing it. It is priceless.