You can, but you shouldn’t. This procedure should only be done when there’s nothing to do to
save your natural teeth.
On the other hand when a tooth has been lost the ideal situation is to replace it immediately after
extraction for an implant to minor bone loss and keep the balance between teeth.