You can, but there are extremely few options, afaik the only real one being Microsoft’s SwiftKey, or GBoard. Both are way worse than their android counterparts however